When I try to push my master branch, I get the following error:
sh: git-receive-pack: command not found
fatal: The remote end hung up unexpectedly
I know why this is happening. The $PATH on my SSH is only seeing /usr/bin:/bin:/usr/sbin:/sbin
My user is setup with a /bin/sh shell so using .profile/.bashrc/.bashprofile is not an option.
I can't use .ssh/environment either, because my PermitUserEnvironment
is set to no.
I tried to create a hooks/pre-receive and set the path there, that did not work either.
Any idea on how to make SSH see git and get this working?
Thanks
I found it!
http://www.wiredrevolution.com/git/fix-git-upload-pack-and-git-receive-pack-errors-on-shared-hosting
The second solution involves adding the path to your git-upload-path and git-recieve-path in your local .git/config file under [remote "origin"]. This is the easiest method as you only have to make this change once.
[remote "origin"] url = <repo address> fetch = +refs/heads/*:refs/remotes/origin/* uploadpack = <path to git-upload-pack> receivepack = <path to git-receive-pack>