Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Git fatal: remote end hung up

Tags:

git

windows

People also ask

How do you solve fatal the remote end hung up unexpectedly?

Solution. 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.

What is git postBuffer?

From the git config man page, http. postBuffer is about: 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.

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.


I found out that using ssh.exe from the Git package works every time, as opposed to the ssh that comes with cygwin (the default). Using this exported variable seems to help; it's slower (2x or more) but it's more stable. Take it as another workaround.

$ export GIT_SSH=/cygdrive/c/Program\ Files/Git/bin/ssh.exe

FYI: This version of Msysgit comes with OpenSSH 4.6p1, OpenSSL 0.9.8e. [works] Cygwin's SSH is OpenSSH 5.5p1, OpenSSL 0.9.8n. [doesn't work]


I had the same problem with plink for git under windows.

On run of plink.exe -v [email protected] it started to show Pageant is running. Requesting keys. Pageant has 1 SSH-2 keys login as: <<< trouble

Instead of Pageant is running. Requesting keys. Pageant has 1 SSH-2 keys Using user "xxx"

To resolve this problem I cleaned up the putty registry records and sessions by putty.exe -cleanup

After that plink starts afresh and asks to trust and store the host again and it is getting connected with no problem !


Try following steps, maybe something will give you a hint on your problem:
1. Run putty and after setting up server name/user name/keys etc. save those settings.
2. Run plink.exe or plinkw.exe like plink.exe user_name@server, (it'll throw some info at you) just to see if plink can connect to the server.
3. Check again that git knows that it should use plink, I'd say with all VCSs, that's the problem people have most often, apart from their keys not being set up properly.
Normally by now most of your ssh problems would be revealed. Now just fix them. :)

Update:

I think the problem you have is caused by several gits you've got installed. For the msysgit and cygwin git you'd need to set the GIT_SSH variable. That's done via either 'set GIT_SSH=c:\path\putty\plink.exe' or 'export GIT_SSH=/your/path/putty/putty.exe' respectively. If you're also using tortoise git, you'd need to locate 'properties' (or is it settings?) in it's menu, and set the ssh client there.
Apart from all that, when specifying git clone URL, use your login name and the server name in there, e.g. 'git clone ssh://user@server/your/path/repo.git User and server names should be used by plink, and plink should be able to connect to the server with those arguments, when all of those requirements are met, you'll be all set.

Good luck.


If you want to try the cygwin openssh 5.4p1-1, which does seem to work for this, unlike 5.5 or 5.6, you can use the cygwin time machine mirrors. Start setup.exe with -X and add a mirror Url, such as:

ftp://www.fruitbat.org/pub/cygwin/circa/2010/05/20/230133

Be careful not to install too much, i.e. base packages, from an older mirror than the rest of your install.


We had same problem and here is solution how we solved the problem:

at first we got:

zajdan@cyberFuture:~$ git clone ssh://[email protected]/~repos/erotika.git/ erotika
Initialized empty Git repository in /home/zajdan/erotika/.git/
Password: 
fatal: '/repos/erotika.git': unable to chdir or not a git archive
fatal: The remote end hung up unexpectedly
zajdan@cyberFuture:~$ 

solution:

zajdan@cyberFuture:~$ git clone ssh://[email protected]/~/repos/erotika.git/ erotika

after tilde there must be a slash!