{"thread":{"id":"21936","subject":"git fetch with GIT_SSH fails with \"The remote end hung up unexpectedly\"","startedAt":"2009-12-11T11:57:54Z","lastAt":"2009-12-11T11:57:54Z","messageCount":1,"participants":["Gert Palok"],"isPatch":false,"patchVersion":null,"patchTotal":null},"messages":[{"id":"129744","messageId":"c39db29a0912110357t2390e2bcv4c447e320ea379a4@mail.gmail.com","threadId":"21936","inReplyTo":null,"subject":"git fetch with GIT_SSH fails with \"The remote end hung up unexpectedly\"","fromName":"Gert Palok","fromEmail":"gert_p@ut.ee","sentAt":"2009-12-11T11:57:54Z","receivedAt":"2009-12-11T11:57:54Z","isPatch":false,"sender":{"key":"gert_p@ut.ee","avatar":null},"body":"At my work I have to use an intermediate gateway to ssh to the outer\nworld. I have set up private-public keys to allow easy connection:\nssh gateway ssh user@outside\n\nNow, I want to fetch from outside repo, so I created a GIT_SSH wrapper:\n\n#! /bin/bash\n\nLOG=\"/path/to/git-ssh-wrapper.\nlog\"\nHOST=\"$1\"\nCOMMAND=\"$2\"\n\necho host: $HOST >>\"$LOG\"\necho command: $COMMAND >>\"$LOG\"\necho exec: ssh gateway ssh \"$HOST\" $COMMAND >>\"$LOG\"\nssh gateway ssh \"$HOST\" $COMMAND\n\nAnd ran:\n$ GIT_SSH=\"/path/to/git-ssh-wrapper\" git clone ssh://user@outside/path/to/repo\nInitialized empty Git repository in /path/to/local-repo/.git/\nwarning: You appear to have cloned an empty repository.\n$ fatal: The remote end hung up unexpectedly\n\nAnd again just to be sure:\n$ GIT_SSH=\"/path/to/git-ssh-wrapper\" git fetch origin\n$ fatal: The remote end hung up unexpectedly\nfatal: The remote end hung up unexpectedly\n\nNow, the log says:\nhost: user@outside\ncommand: git-upload-pack '/path/to/repo'\nexec: ssh gateway ssh user@outside git-upload-pack '/path/to/repo'\n\nWhen I ran the command from shell I got:\n$ \"$GIT_SSH\" user@outside \"git-upload-pack '/path/to/repo'\"\n0000\n\nAnd the connection was kept open (waiting for input, got protocol\nerror after entering something)\n\nLocal environment: Windows Vista 32-bit, cygwin 1.7\nLocal git version (installed by cygwin): 1.6.4.2\nRemote git version: 1.6.4.4\n\nWhat might be the cause(s)? Have there been compatibility breaking\nprotocol changes between those version?\n\n--\nGert Palok\n"}]}