I have been using git to keep two copies of my project in sync, one is my local box, the other the test server. This is an issue which occurs when I log onto our remote development server using ssh;
git clone firstname.lastname@example.org:/home/chris/myproject Initialized empty Git repository in /tmp/myproject/.git/ Password: bash: git-upload-pack: command not found fatal: The remote end hung up unexpectedly fetch-pack from 'email@example.com:/home/chris/myproject' failed.
(the file-names have been changed to protect the guilty... !)
Both boxes run Solaris 10 AMD. I have done some digging, if I add --upload-pack=
which git-upload-pack the command works, (and proves that $PATH contains the path to 'git-upload-pack' as per the RTFM solution) but this is really annoying, plus 'git push' doesn't work, because I don't think there is a --unpack= option.
Incidentally, all the git commands work fine from my local box, it is the same version of the software (126.96.36.199), installed on the same NFS mount at /usr/local/bin.
Can anybody help?
git-upload-pack is on the path from a non-login shell. (On my machine it's in
To see what your path looks like on the remote machine from a non-login shell, try this:
ssh you@remotemachine echo \$PATH
(That works in Bash, Zsh, and tcsh, and probably other shells too.)
If the path it gives back doesn't include the directory that has
git-upload-pack, you need to fix it by setting it in
.bashrc (for Bash),
.zshenv (for Zsh),
.cshrc (for tcsh) or equivalent for your shell.
You will need to make this change on the remote machine.