At my work I have to use an intermediate gateway to ssh to the outer world. I have set up private-public keys to allow easy connection: ssh gateway ssh user@outside
Now, I want to fetch from outside repo, so I created a GIT_SSH wrapper:
#! /bin/bash
LOG="/path/to/git-ssh-wrapper. log" HOST="$1" COMMAND="$2"
echo host: $HOST >>"$LOG" echo command: $COMMAND >>"$LOG" echo exec: ssh gateway ssh "$HOST" $COMMAND >>"$LOG" ssh gateway ssh "$HOST" $COMMAND
And ran: $ GIT_SSH="/path/to/git-ssh-wrapper" git clone ssh://user@outside/path/to/repo Initialized empty Git repository in /path/to/local-repo/.git/ warning: You appear to have cloned an empty repository. $ fatal: The remote end hung up unexpectedly
And again just to be sure: $ GIT_SSH="/path/to/git-ssh-wrapper" git fetch origin $ fatal: The remote end hung up unexpectedly fatal: The remote end hung up unexpectedly
Now, the log says: host: user@outside command: git-upload-pack '/path/to/repo' exec: ssh gateway ssh user@outside git-upload-pack '/path/to/repo'
When I ran the command from shell I got: $ "$GIT_SSH" user@outside "git-upload-pack '/path/to/repo'" 0000
And the connection was kept open (waiting for input, got protocol error after entering something)
Local environment: Windows Vista 32-bit, cygwin 1.7 Local git version (installed by cygwin): 1.6.4.2 Remote git version: 1.6.4.4
What might be the cause(s)? Have there been compatibility breaking protocol changes between those version?
-- Gert Palok