Take the 2-minute tour ×
Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

I'm trying to setup gitolite on my server which is a mac mini running os X leopard (non-server version). I believe I correctly installed gitolite using the root installation method detailed on https://github.com/sitaramc/gitolite/blob/pu/doc/1-INSTALL.mkd#_important_points_to_note . The only big difference is that my git user's home directory is set to an external drive connected to the mac mini, in my case /Volumes/Drobo/git . I'm getting stuck on the part where I try to clone gitolite-admin into my local machine's user directory (running os x lion).

I receive this error:

Cloning into gitolite-admin...
Can't exec "git": No such file or directory at /usr/local/bin/gl-auth-command line 192.
fatal: The remote end hung up unexpectedly

I have tried the things suggested at gitolite unable to exec git but they have not panned out.

running ssh git@serverAddress info

returns

hello latca, the gitolite version here is v2.0.3-28-g7c8c5a8
the gitolite config gives you the following access:
     R   W  gitolite-admin
    @R_ @W_ testing

Also suggested in the thread I've added .bashrc file into the git user's home directory on the server with a single line export PATH=/usr/local/bin:$PATH and that has not worked either

line 192 from gl-auth-command is exec("git", "shell", "-c", "$verb $repo") unless $verb eq 'git-init';

I'm still a commandline neophyte so please let me know what other information you guys need to help diagnose the problems.

Much Thanks in Advance

share|improve this question

2 Answers 2

Gitolite 2.x

If git is not in the default PATH, then you can set $GIT_PATH in your gitolite user’s ~/.gitolite.rc.

The default .gitolite.rc comes with this line:

$GIT_PATH="";

If your Git installation is under /usr/local (so that you have /usr/local/bin/git), then replace the above line with this one:

$GIT_PATH="/usr/local/bin";

See “support for git installed outside default PATH” in the Gitolite documentation.

Gitolite 3.x

The 3.x version of Gitolite is a complete rewrite. One of the incompatibilities with respect to the 2.x series is the lack of $GIT_PATH. From the “incompatible features”, “high impact” section of the migration documentation:

  • GIT_PATH dropped, requires presetting.

    If you need its functionality, add these lines to the end of the rc file:

    $ENV{PATH}="...whatever you want...";
    1;
    

So, for Gitolite 3.x, the ~/.gitolite.rc change should be something like this:

$ENV{PATH}="/usr/local/bin:$ENV{PATH}";

(somewhere before the final 1; line)

share|improve this answer
    
You save me. After I upgrading git to newest version and then I encounter this problem. I solved by modifying the $GIT_PATH inside ~/.gitolite.rc. Thank you very much. –  Toro May 9 '12 at 10:18

.bashrc is only invoked for interactive shells. Try adding export PATH=/usr/local/bin:$PATH to ~/.bash_profile.

share|improve this answer
    
I tried adding it to the user directory of both my local machine and the remote one and receive the same error. Is a restart of either required for any of the changes to kick in? –  latca Sep 2 '11 at 16:26

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.