Page MenuHomePhabricator

Git hosting error on CentOS: sudo: git-upload-pack: command not found
OpenPublic

Asked by Slumber86 on Mar 9 2016, 4:22 PM.
Tags
None
Referenced Files
F1165589: Schermata 2016-03-09 alle 17.15.07.png
Mar 9 2016, 4:22 PM
Subscribers
None

Details

I have a fresh install of phabricator on a CentOS 6 machine. I have configured all the settings except the ssh hosting. I have followed the guide here but i'm struck getting:

❯ git clone ssh://git@XXX.net/diffusion/4/native-hybrid-demo.git
Cloning into 'native-hybrid-demo'...
sudo: git-upload-pack: command not found
fatal: Could not read from remote repository.

Please make sure you have the correct access rights
and the repository exists.

when I try to ssh I get this (seems correct):

❯ ssh git@XXX
PTY allocation request failed on channel 0
phabricator-ssh-exec: Welcome to Phabricator.

You are logged in as a.marzotta.

You haven't specified a command to run. This means you're requesting an interactive shell, but Phabricator does not provide an interactive shell over SSH.

Usually, you should run a command like `git clone` or `hg push` rather than connecting directly with SSH.

Supported commands are: conduit, git-receive-pack, git-upload-pack, hg, svnserve.
Connection to irisfactory.cloud.reply.eu closed.

If I try to exec the command in the SSH session:

❯ ssh git@XXX git-receive-pack /diffusion/X/
phabricator-ssh-exec: No repository "X" exists!

or

❯ ssh git@XXX git-receive-pack /diffusion/4/
sudo: git-receive-pack: command not found

If I try to sudo and execute the command seems right

[root@XXX ~]# su git
[git@XXX root]$ sudo -E -n -u daemon-user -- /usr/local/git/bin/git-receive-pack
usage: git receive-pack <git-dir>

Finally the repo configuration:

Schermata 2016-03-09 alle 17.15.07.png (372×713 px, 83 KB)

Someone can help me?

Answers

avivey
Updated 3,319 Days Ago

/usr/local/git/bin/git-receive-pack is not in user git's PATH.

Depending on your settings, you need to add /usr/local/git/bin/ to the PATH in /home/git/.bashrc or in /etc/profile (For ALL users), or somewhere else.

New Answer