$ ssh host 'echo $PATH'
/usr/local/bin:/bin:/usr/bin
$ git clone ssh://host/$HOME/git/repo test
Initialized empty Git repository in /home/user/test/.git/
ksh: line 1: git-upload-pack: not found
fatal: The remote end hung up unexpectedly
This should work as a temporary fix:
git clone --upload-pack=git/bin/git-upload-pack ssh://host/$HOME/git/repo test
or
git clone -u git/bin/git-upload-pack ssh://localhost/$HOME/git/repo test
for short.
(where git/bin is the path to your git binaries at the remote end)
If you want to permanently set this once you've cloned it,
cd into the directory and issue the commands:
$ git config remote.origin.uploadpack git/bin/git-upload-pack
$ git config remote.origin.receivepack git/bin/git-receive-pack
These links may help:
- https://37s.backpackit.com/pub/1465067
- http://stackoverflow.com/questions/1603739/ssh-ksh-git-not-found
- http://go.hopx.net/2009/03/using-git-where-git-is-not-installed.html
- http://kernel.org/pub/software/scm/git/docs/git-clone.html
- http://projectmouse.org/git-clone.html
- http://www.bluestatic.org/blog/2007/08/01/git-public-push-ing/