Git remote pushing

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
This entry was posted in Programming and tagged , , . Bookmark the permalink.

2 Responses to Git remote pushing

  1. Glebk says:

    thanks a lot! that helped

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

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>