gitlabhq/gitlabhq — Issue #326: Install document missing PATH handling
Author: mfn
Created: 2012-01-24 09:14:40+00:00
State: open

https://github.com/gitlabhq/gitlabhq/wiki/Gitolite

writes

```
# install gitolite
sudo -u git -H /home/git/gitolite/src/gl-system-install
```
On my system I get:

```
$ sudo -u git -H /home/git/gitolite/src/gl-system-install
using default values for EUID=102:
/home/git/bin /home/git/share/gitolite/conf /home/git/share/gitolite/hooks

***** WARNING *****
gl-setup is not in your $PATH.

Since gl-setup MUST be run from the PATH (and not as src/gl-setup or such),
you must fix this before running gl-setup. The simplest way is to add

PATH=/home/git/bin:$PATH

to the end of your bashrc or similar file. You can even simply run that
command manually each time you log in and want to run a gitolite command.

Run /home/git/gitolite/src/gl-system-install -h for a detailed usage message.
```

Using the shell trick just used in the line below solves this:

```
sudo -u git -H sh -c "PATH=/home/git/bin:$PATH; /home/git/gitolite/src/gl-system-install"
```