macports: git-upload-pack: command not found
| 19-Nov-2009 | Posted by Sonia Hamilton under Git, OSX |
When doing a git clone from a repo hosted on a Mac OSX machine (installed using macports), I get this error on the client (Linux, cygwin, whatever):
git-upload-pack: command not found
Solution is to do this on the OSX machine:
cd /usr/bin sudo ln -s /opt/local/bin/git* .
Obviously some $PATH funkiness is going on somewhere on the Mac, and I should find a better fix. My personal $PATH on the Mac is OK:
$ echo $PATH /opt/local/bin:/opt/local/sbin:/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin:/usr/X11/bin
Share This
Perhaps you got bit by the git-* commands being removed from $PATH? To run git commands now you have to run ‘git foo’ instead of ‘git-foo’.
Hi Pabs! No, the issue is when OSX is acting as a server eg I’m doing a clone on a Linux box from an OSX box. git-clone vs git clone doesn’t make a difference. (Or maybe I’ve misunderstood you).
I ran into this two nights ago. If you’re using zsh you need to ensure you PATH environment variable is set in ~/.zshenv instead of .zshrc. This is because zsh doesn’t read .zshrc when the session isn’t interactive.
E.g. in .zshenv
export PATH=”/opt/local/bin:$PATH”
Thanks Wes! .zshenv makes sense, Sonia.