For the last half an hour I have been playing with Git. Project I’m working on my laptop is version tracked by git. However what is the fun of using version control without a remote server.
As soon as I pushed my project directory to my remote OS X Tiger server, I got the following error.
bash: line 1: git-receive-pack: command not found
fatal: The remote end hung up unexpectedly
Google comes to rescue.
Many installations of sshd do not invoke your shell as the login shell when you directly run programs; what this means is that if your login shell is bash, only .bashrc is read and not .bash_profile. As a workaround, make sure .bashrc sets up $PATH so that you can run git-receive-pack program.
Running following two lines solved the problem.
echo export PATH=/usr/local/bin:$PATH >> ~/.bashrc
source ~/.bashrc
thanks a lot! that helped
This is, of course, obvious when you think about it, but just for crystal clarity you might want to mention that you run the two lines on the SERVER, not the client.
Also, the second of them makes no difference.
Thirdly, if you have Git installed in a non-standard location, you should of course substitute the path you’re using.