Page MenuHomePhabricator

git-http-backend not found even when it is on path and symlynked to phabricator/bin
Closed, InvalidPublic

Description

Trying to set up git support over http in Phabricator on Ubuntu 14.04, I have followed the setup and added /usr/lib/local

Missing Binary git-http-backend Unable to find this binary in the webserver's PATH. You may need to configure environment.append-paths.

I have tested whether the binary is seen by phabricator with the following script (offered on the Phabricator irc channel)

require '/path/to/phabricator/scripts/__init_script__.php'; var_dump(Filesystem::resolveBinary('git-http-backend'));

With the correct result:

>string(34) "/usr/lib/git-core/git-http-backend"

But the warning abou the binary not being on the path persists in diffusion, and I cannot clone a repository (Error 500).

I have changed the ownership of the /var/repo repository files to both daemon-user and vcs-user. GIT-CURL_VERBOSE will only show "permission denied".

Added a symlink of git-http-backend to the /phabricator/support/bin folder. No changes (warning in diffusion about missing binary remains, no permission to clone on local machine).

Event Timeline

FvD raised the priority of this task from to Needs Triage.
FvD updated the task description. (Show Details)
FvD added a subscriber: FvD.

I did see [T4405] as I was working on this. And the sudoer file is configered and triple checked as described in the documentation. It may still be wrong of course, so to make sure these are the steps I took:

  1. Add users
sudo useradd -r -s /bin/sh vcs-user
sudo useradd -r -s /bin/sh phd-user
  1. Change visudo file
vcs-user ALL=(phd-user) SETENV: NOPASSWD: /usr/bin/git-upload-pack, /usr/bin/git-receive-pack
www-data ALL=(phd-user) SETENV: NOPASSWD: /usr/lib/git-core/git-http-backend

www-data is the user running apache.

FvD closed this task as Invalid.EditedNov 17 2014, 7:25 PM
FvD claimed this task.

I checked everything once again, and this particular issue with the binary not being found was caused by a bad symlynk in /support/bin.

The correct way was:

cd to ../phabricator/support/bin

sudo ln -sv /usr/lib/git-core/git-http-backend

After this the permission issues are solved.