The remote end hung up unexpectedly while Git push with large files

usually, remote end hangups are from unauthorized users. but if you can successfully connect that's not the issue.

if you really think it's a file size issue, this is my best suggestion:

the default size at which the git client starts "chunking" the request is 1MB. you can change this setting using:

git config http.postBuffer 524288000

this example sets the postBuffer to 500MB. play around with this value and see if it helps.


I came accross this issue with bitbucket, increasing the postBuffer was likely needed but did not solve the issue.

I was only able to resolve this by using another internet connection.

These are the errors GIT_CURL_VERBOSE=1 returned:

* SSLRead() return error -9820
* Connection died, retrying a fresh connect
* Closing connection 0

and then

* SSLWrite() returned error -36
* Closing connection 1
error: RPC failed; result=55, HTTP code = 0
fatal: The remote end hung up unexpectedly

Hopefully that helps somebody, maybe someone with more knowledge understands those SSL errors?

Update:

The issue I had was on an inital git push into the repo and since then I have tried the same push into the same bitbucket repo with the original internet connection and it works.