macports: git-upload-pack: command not found

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
Tags: ,


Share This


 


4 Responses to macports: git-upload-pack: command not found

  1. 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).

  2. 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”

Leave a Reply

Your email address will not be published. Required fields are marked *

*

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>