GITHUB / Google Code – error The remote end hung up unexpectedly

The solution is to increase http.postBuffer

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.

$ git push -v origin my-branch

Pushing to https://github.com/somepath/my-repository.git

Username:

Password:

Counting objects: 94, done.

Delta compression using up to 2 threads.

Compressing objects: 100% (7878), done.

error: RPC failed; result=22, HTTP code = 0

fatal: The remote end hung up unexpectedly

Writing objects: 100% (9393), 12.62 MiB | 18.51 MiB/s, done.

Total 93 (delta 11), reused 0 (delta 0)

fatal: The remote end hung up unexpectedly

fatal: expected ok/error, helper said ‘2004F??%z?s”???”?9(}?*????y’

$ git config http.postBuffer 52428800 This value is only for this example. Modify it according to your need.

This changes the properties file adding

[http]

postBuffer = 52428800

$ git push -v origin my-branch

Pushing to https://github.com/somepath/my-repository.git

Username:

Password:

Counting objects: 94, done.

Delta compression using up to 2 threads.

Compressing objects: 100% (7878), done.

Writing objects: 100% (9393), 12.62 MiB | 18.44 MiB/s, done.

Total 93 (delta 11), reused 0 (delta 0)

To https://github.com/somepath/my-repository.git

  • [new branch] my-branch -> my-branch

Now “push” works ok! (at least for me)

git