开发者

Errors cloning git project using Cygwin, msysgit Bash shell works

I have Cygwin installed on Windows XP and it comes with git v1.7.3.3. I also have SSH access to a git repository hosted on a Linux server. Sometimes, when cloning a large project using Cygwin I get the following error:

$ git clone ssh://me@server/git/project
Cloning into project...
remote: Counting objects: 44255,开发者_StackOverflow done.
remote: Compressing objects: 100% (8111/8111), done.
fatal: The remote end hung up unexpectedly.61 MiB | 10.91 MiB/s
fatal: early EOF
fatal: index-pack failed

This seems to be random - repeating the clone will often work. However, it is obviously a great cause for concern.

So I installed msysgit instead (which is version 1.7.3.1.msysgit.0) and using the Git Bash shell I do not get this problem. I'm pretty sure that msysgit is set up to use plink (PuTTY? I'm new to this) which might be relevant.

I wonder if this is something to do with OpenSSH? I would prefer to use Cygwin as my shell as it has a lot of other packages available that I need to use.

Anyone seen this before or have any ideas how I can fix it?


An alias to msysgit does the trick. I added the following to my Cygwin .bash_profile:

alias git='"C:/Program Files/git/bin/git.exe"'

Hopefully this will be resolved in a future release of the Cygwin git.


As far as I remember this is fixed in recent cygwin 1.7 releases, meanwhile as a workaround try disabling compression:

git config --add core.compression -1
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜