10

I've spent all day on this one and could really use some help. When I try to push a relatively large commit,

Writing objects: 100% (21/21), 908.07 KiB | 0 bytes/s, done.
Total 21 (delta 17), reused 0 (delta 0)

git takes a very long time to respond and then gives

"efrror: RPC failed; result=55, HTTP code = 0 
atal: The remote end hung up unexpectedly
fatal: The remote end hung up unexpectedly
Everything up-to-date"

I have searched this error code, and the most likely solution seems to be extending the buffer size

git config http.postBuffer 524288000

I have tried this solution with no success. After VonC's suggestion, I tried switching from http to ssh. From ssh, I get a long hang up at the same point. Eventually, the following error message appears

Read from remote host github.com: Connection reset by peer
fatal: The remote end hung up unexpectedly
fatal: The remote end hung up unexpectedly

Could this be a router issue? I have tried pushing from a different computer on a different network and am able to do so successfully.

I am away from my Linux machine on a Windows host and using the terrible poshGit Windows PowerShell interface.

Any ideas??

gnetscher
  • 101
  • 1
  • 1
  • 6
  • If ssh fails, it can be because it is blocked for outgoing connections. This is certainly the case for me at work (behind a firewall). Do an https push work from that different computer on a different network? – VonC Jul 04 '13 at 05:24
  • Okay, yes, you are quite correct. Thank you very much for your help. – gnetscher Jul 19 '13 at 23:08

4 Answers4

7

You can follow the debug advices from the BitBucket article:

Specifically, the 'result=55' portion.
This is the error code coming from libcurl, the underlying library used in http communications with Git. From the libcurl documentation, a result code of 55 means:

CURLE_SEND_ERROR (55)
    Failed sending network data.

Cause

This can be caused by a variety of network related issues or even the Bitbucket service itself. It essentially means that the connection was dropped unexpectedly. Things to check would be to attempt the push from a machine on a 'clean' network outside of any corporate firewalls or proxies. Check all proxy servers to ensure they are properly moving SSL data and are fully permitted to complete.

To help troubleshoot this issue, try running the push with the command

GIT_CURL_VERBOSE=1 git push

Workaround

If after checking all connections and proxy configurations the connection still fails consistently, please report the information above to support. Then switch to SSH. We have a guide to getting it setup for Git at Set up SSH for Git. If you should run into any configuration issues while setting up SSH, please refer to our SSH Troubleshooting guide.

Community
  • 1
  • 1
VonC
  • 1,262,500
  • 529
  • 4,410
  • 5,250
5

I experienced the issue due to a misconfiguration, where I pointed to a remote prefixed with http:// instead of https:// the answer hinted on SSL and this helped me to a solution for my issue.

So my remote configuration should be written:

$ git remote add origin https://github.com/jonasbn/perl-workflow.git

over:

$ git remote add origin http://github.com/jonasbn/perl-workflow.git

Take care,

jonasbn

jonasbn
  • 183
  • 4
  • 11
  • 2
    Interesting. +1. You can use `git remote set-url origin https://...` to quickly change that url. – VonC Feb 03 '14 at 13:48
  • Oh yeah, that is even faster, I am somewhat a git n00b, so thanks for the additional tip – jonasbn Feb 22 '14 at 15:20
  • How I fixed it: I opened .git/config with a text editor and added the missing 's'. The cause was that I cloned with http, not https. – Henno Mar 15 '14 at 08:23
0

Its worked for me

i just kill the terminal and after then open it again and execute the commands normally....

kill terminal

open it again

git push -u origin master

0

I had the same problem when I was trying to push on GitHub, the problem was that I was trying to upload a large image 3mb+ to GitHub and my connection was very slow. to test that I have created another repo and I uploaded the codebase to the repo manually but the problem was still the same I got the error Something went wrong at that time I figure out the problem was my internet connection

Solution

  1. try to increase your internet connection speed. if you are using WIFI you can closer the router to the device if that doesn't work you can try to connect to the internet using an ethernet cable or whatever The idea here is to increase internet speed
  2. if the above solution didn't work then you have to compress your images and then push as normal

Hopefully, this is going to help someone,