I am trying to setup gitolite on my server (Macos server).
I followed the instructions in the INSTALL document found here : http://sitaramc.github.com/gitolite/doc/1-INSTALL.html
I installed the root method.
I got everything setup (ssh pubkey authentication and default gitolite setup)
$ssh git@server info
hello admin, the gitolite version here is v1.5.9.1-27-gb97115f
the gitolite config gives you the following access:
R W gitolite-admin
@R_ @W_ testing
According to installation instruction I should be able to checkout a repository.
But when I try to clone the gitolite-admin repositry I get an error:
$ git clone git@server:gitolite-admin
Cloning into gitolite-admin...
Assertion failed: (argv0_path), function system_path, file exec_cmd.c, line 27.
error: git-shell died of signal 6
fatal: The remote end hung up unexpectedly
I got the latest git version of gitolite and git v. 1.7.3.4
Can anybody help me?
Edit 1: added git clone command before error message
The OP skipper3k reports an issue with
RUNTIME_PREFIX
in Git, a bit similar to "git pull
broken" question:Original answer:
First, did you get the most up-to-date gitolite version?
At https://github.com/sitaramc/gitolite/, you need to consider the '
pu
' branch.The installation documentation is then this one.
GitoliteV3 or 'g3' doc:
Old answer for gitolite V2: Second, I prefer the
"from-client method"method:So I like to create a
~/.ssh/config
file with the two different sets of parameters:The gitolite-admin is only visible for the first public ssh key:
With my account:
So:
I pretty much tried anything I could think of and couldn't get it to work...until I noticed somewhere that GIT is very high on email addresses...so I regenerated my ssh keypair using the -C option:
ssh-keygen -t rsa -C "nospam@nowhere.org"
Low and behold, all of a sudden I could clone gitolite-admin without any problem.
Apparently the email in .gitconfig's user.email key MUST correspond to the email that was used to generate the SSH key. Honestly, if you only have 1 keypair in your .ssh folder, why on earth does it matter that the email corresponds? Imho, if you pass a key and the key is in the authorized_keys on the server, it should work regardless of the .gitconfig user.email property.
The problem was with the way git was compiled on mac. I had to manually compile git without the RUNTIME_PREFIX set. Now it works.
To pile on, as a solution for Gitolite v3, for Mac Lion, this is what worked for me:
Add it to ~/.gitolite.rc for the git user on the server. Make sure it is before the "1;" at the end.
As detailed in: https://serverfault.com/questions/307493/cant-clone-gitolite-admin
The solutions involving GIT_PATH are outdated, according to: http://sitaramc.github.com/gitolite/g2migr.html
It seems the correct fix to this error is to add
to your .gitolite.rc file.
Having just dealt with this for a third time after forgetting the first two times, I figure it can't be unusual.
At least one reason for this is that the gitolite user must have a login shell - making a system user won't work for some reason.. it just falls over, causing the error above.
Also, for the ssh test, you must switch off PTYs on the command line otherwise ssh simply won't work - I think maybe it worked with older versions of ssh but doesn't on anything I have:
(why it thinks I'm called 'key' is another config issue I haven't solved yet).