I've just changed the git remote for my server, and now when I try to use git push web master
, (after staging and committing the changes), I get this:
bash: git-receive-pack: command not found
fatal: Could not read from remote repository.
Please make sure you have the correct access rights
and the repository exists.
It comes up immediately after pressing enter, so it's had barely any time to check the server. I've already tried adding export PATH=$PATH:/usr/local/git/bin
to .bashrc
in my home directory. I use Mac OS X, 10.9.5.
Thanks for any help :)
which git-receive-pack
. I've had occasions where git is trying to call a command that hasn't been installed. Tryfind / -name git-receive-pack
.which git-receive-pack
returns/usr/local/git/bin/git-receive-pack
. What should I be looking for withfind / -name git-receive-pack
? It returns a whole load of paths, many withPermission Denied.
at the end - what should I be looking for?find
ifwhich
sees it. For future reference, you might want to run find as root (su
orsudo
? I assume Mac has something like that.) It may be thatgit
calls bash without using your.bashrc
. Can you set thePATH
more globally?.bashrc
to set the$PATH
more globally?.bashrc
. That's your local, user-level bash configuration. I don't know MacOS, but in other unices you might edit/etc/bashrc
or/etc/environment
or something similar.