3

I am using git over hamachi vpn and am able to clone the remote repository.

However, git pull/fetch fails after hanging for a long time. The error message displayed is:

Write failed: Broken pipe                                                                                      
fatal: The remote end hung up unexpectedly 

Can anyone guess whats happening?

sud03r
  • 181
  • 1
  • 5
  • 2
    same error with me - any way to find out what's going wrong? – Here Be Wolves Aug 10 '11 at 16:56
  • Did you use the git protocol to clone the repository? It may be worth it to try and use https:// instead of git:// and see if that works. I believe git:// defaults to using SSH and something in your configuration may be blocking that port. – sbtkd85 Aug 10 '11 at 17:14
  • @sbtkd85 i can ssh to that machine. – sud03r Aug 10 '11 at 17:24
  • the other guy is using gitosis, and there is no authorization problem. – sud03r Aug 10 '11 at 17:33
  • That is weird. Maybe the SSH keys are corrupted or incorrect. When you SSH does it automatically log you in, or do you have to authenticate every time? Also, I'd still be interested to know if you clone the repository via https:// instead of git:// if you still have issues doing push/pull. – sbtkd85 Aug 11 '11 at 13:02
  • In my case, I had to turn off my WiFi and turn it back on again. Rest of internet was working, including fast.com, but for some reason no GitHub operations were working. – Joshua Pinter Nov 26 '20 at 21:16

2 Answers2

0

Git push fails with

fatal: The remote end hung up unexpectedly

If, when attempting git push, you get a message that says:

fatal: The remote end hung up unexpectedly

There are a couple of reasons for that, but the most common is that authorization failed. You might be using a git:// URL to push, which has no authorization whatsoever and hence has write access disabled by default. Or you might be using an ssh URL, but either your public key was not installed correctly, or your account does not have write access to that repository/branch.

Giacomo1968
  • 53,069
  • 19
  • 162
  • 212
wizlog
  • 13,277
  • 24
  • 77
  • 116
-1

I had the same problem and resolved it with this command:

echo 1400 > /sys/class/net/eth0/mtu
fixer1234
  • 27,064
  • 61
  • 75
  • 116