Getting git clone to work between MacPorts installations

If you use MacPorts to install git, then the various git programs (git, gitk, etc.) will be installed in MacPorts’ usual /opt/local/bin directory. This, however, seems to screw up the git clone operation which complains about not finding the git-upload-pack binary.

Trying the --upload-pack option to pass in a nonstandard location for the upload-pack binary on the remote end doesn’t seem to help — I get errors saying that “git-pack-objects died with error.”

What finally worked in the end was following the workaround from Paul Johnston.

$ cd /usr/bin
$ sudo ln -s /opt/local/bin/git* .

Now the binaries are symlinked from the expected location and that seems to make git clone behave.

Post a Comment

Your email is never published nor shared. Required fields are marked *
*
*