Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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

When I try to push to my bitbucket repo, I get the following error. (In fact its the same in GitHub as well).

Counting objects: 48, done.
Delta compression using up to 2 threads.
Compressing objects: 100% (38/38), done.
Writing objects: 100% (48/48), 1.95 MiB | 38 KiB/s, done.
Total 48 (delta 9), reused 0 (delta 0)
fatal: The remote end hung up unexpectedly
error: RPC failed; result=56, HTTP code = 0
fatal: recursion detected in die handler
Everything up-to-date

Mostly I get another error like

error: RPC failed; result=56, HTTP code = 0
fatal: The remote end hung up unexpectedly

Either way PUSH fails. This is only for large files I guess. For smaller changes it works fine. I've updated http.postBuffer to 2M and it still doesn't work.

Important I've a 3G connection and an CDMA based EVDO Internet connection. With the 3G connection, the PUSH and everything else works FINE. But with the EVDO I get the above errors. So I'm under the impression that its because of some connection problem with my EVDO or ISP.

How can I resolve this?

like image 207
shahalpk Avatar asked Apr 05 '13 17:04

shahalpk


People also ask

How do you fix a remote end hung up unexpectedly?

To solve the issue, change the settings of your buffer so that you have enough space available. You can increase the buffer value up to 2000000000.

How do you increase git buffer size to the largest individual file size of your repo?

Resolution. Increase the Git buffer size to the largest individual file size of your repo: git config --global http. postBuffer 157286400.

Why is git push taking so long?

One possibility might be that you have large binary file(s) commited in the latest commit. git is not good at working with binary file. If commiting binary files was a mistake, you can refer to following answer for getting rid of binary file in commit.


2 Answers

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.

like image 169
xero Avatar answered Sep 24 '22 10:09

xero


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.

like image 42
will Avatar answered Sep 24 '22 10:09

will