1

Starting from scratch, setup git on my Windows workstation and have been following the instructions on http://git-scm.com/book/en/Git-on-the-Server-Getting-Git-on-a-Server to setup my bare repo. Was able to scp the files to my hosted server using git Bash, but when I add the orign server to the repo and try to push I get this:

Pushing to user@host:/home/user/git/project.git
jailshell: 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. 

Thanks for your help.

  • 1
    What was the command that you used for the push? – forivall Mar 20 '13 at 18:55
  • No, not quite. I originally set up a local repo called 'grocery'. The instructions said to create a new bare repo, which I did, called 'grocery.git'. This I uploaded to my server. – M. Brandon Wade Mar 20 '13 at 19:00
  • If I gitBash to the /grocery directory and run 'push origin master' I get the error above. If I run it from my 'grocery.git' directory it says 'everything up-to-date'. @forival: $ git remote add origin git@gitserver:/opt/git/project.git $ git push origin master – M. Brandon Wade Mar 20 '13 at 19:07

2 Answers2

2

You have no git installed on your server.

Please see Does git need to be present on a server to use it? for a possible solution.

Community
  • 1
  • 1
Matthias
  • 724
  • 7
  • 14
1

Make sure that your path is set up so that the git-receive-pack binary is in the path. Try opening up a command prompt/sshing into your server and running git-receive-pack.

If it's not installed at all, install git on your server using [package-manager install-command] git (where package-manager is apt-get or yum, etc. and install-command is usually install)

forivall
  • 9,504
  • 2
  • 33
  • 58
  • I can't install git on the server at all. My understanding is that using SSH was supposed to allow me to use my server storage as a file drop. Is that not the case? – M. Brandon Wade Mar 20 '13 at 19:11
  • 1
    http://stackoverflow.com/questions/10887107/git-installation-needed-on-remote-server-which-is-access-via-ssh-only – M. Brandon Wade Mar 20 '13 at 19:14
  • Yeah, I remember reading an article about how the git push protocol and everything works, but I don't remember if/how push works without the git processes there to handle the process. Particularly since the network traffic is better with the git-specific binaries there, I would try to get them on the server: http://stackoverflow.com/questions/6037707/git-git-upload-pack-command-not-found-while-pushing-to-remote-server – forivall Mar 20 '13 at 19:24