git push hangs after Total line

It only worked for me in the case when I did git push -u origin main, when I just simply used git push for bit bucket, it did not push through.


This turned out to be no problem at all. I simply had to wait until the upload was complete. I had added several large files and there is not a progress indicator. Maybe someone else will find this helpful.


https://git-scm.com/docs/git-config#Documentation/git-config.txt-httppostBuffer

http.postBuffer

Maximum size in bytes of the buffer used by smart HTTP transports when POSTing data to the remote system. For requests larger than this buffer size, HTTP/1.1 and Transfer-Encoding: chunked is used to avoid creating a massive pack file locally. Default is 1 MiB, which is sufficient for most requests.

Note that raising this limit is only effective for disabling chunked transfer encoding and therefore should be used only where the remote server or a proxy only supports HTTP/1.0 or is noncompliant with the HTTP standard. Raising this is not, in general, an effective solution for most push problems, but can increase memory consumption significantly since the entire buffer is allocated even for small pushes.

Resolution

  1. Increase the Git buffer size to the largest individual file size of your repo

  2. git config --global http.postBuffer 157286400

  3. Refer to the resolution of Git push fails - client intended to send too large chunked body for ngnix reverse proxy configuration. Increase this parameter to the largest individual file size of your repo.

  4. Bypass the outbound proxy as explained on Can't clone or pull due to a git outbound proxy

Tags:

Git

Bitbucket