开发者

git pull and fetch fail with "fatal: The remote end hung up unexpectedly"

开发者 https://www.devze.com 2023-01-26 21:03 出处:网络
From cygwin git on Win7 I\'m trying to coordinate with my linux workstation. Both were cloned from the same upstream repository. First I do a \"git fetch origin\", then try to fetch from my workstatio

From cygwin git on Win7 I'm trying to coordinate with my linux workstation. Both were cloned from the same upstream repository. First I do a "git fetch origin", then try to fetch from my workstation.

$ git fetch origin
[... all ok ...]
$ git fetch b
scheib@b's password:
remote: Counting objects: 2031, done.
remote: Compressing objects: 100% (512/512), done.
fatal: The remote end hung up unexpectedly
fatal: early EOFs:  23% (182/789)
fatal: index开发者_Go百科-pack failed


Cygwin's ssh.exe has this bug. Replace cygwin's ssh.exe with ssh.exe from a msysgit install, and this problem will go away.

Related: Git fatal: remote end hung up


How did you create your keys?

With cygwin's git or with the mingw git in git bash?

I believe the real problem is that cygwin's ssh looks for .ssh in /home/name/.ssh and mingw's git ssh looks for .ssh in c:/user/name/.ssh

Chances are your keys are in one and only one of these directories.

You can trying telling cygwin's .ssh to use a different identity file using the -i switch, or move the keys into both directories, or create an ssh config file in /home/name/.ssh/config.

I created a config that contains:

Host github.com
    User jerryasher
    Hostname github.com
    IdentityFile c:/Users/jerry/.ssh/id_rsa

And given that I can use either the mingw git from git bash or cygwin's git from an rxvt to interact with github.

0

精彩评论

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