3

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-pack failed
Vincent Scheib
  • 17,142
  • 9
  • 61
  • 77
  • Would http://stackoverflow.com/questions/3750222/cygwin-git-clone-gives-remote-end-hung-up-unexpectedly-against-ubuntu-10-04-1 help? (including using msysgit instead of cygwin git?) – VonC Nov 24 '10 at 04:55
  • I've worked around this by using msysgit and ssh protocol. – Vincent Scheib Oct 12 '12 at 18:12

2 Answers2

0

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

Community
  • 1
  • 1
Edward Anderson
  • 13,591
  • 4
  • 52
  • 48
-1

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.

Jerry Asher
  • 836
  • 2
  • 10
  • 23