Errors cloning git project using Cygwin, msysgit Bash shell works

旧巷老猫 提交于 2019-12-24 07:47:21

问题


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, 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?


回答1:


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.




回答2:


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


来源:https://stackoverflow.com/questions/4896814/errors-cloning-git-project-using-cygwin-msysgit-bash-shell-works

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!