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
It seems the correct fix to this error is to add
$ENV{GIT_EXEC_PATH} = "/usr/libexec/git-core";
to your .gitolite.rc file.
The OP skipper3k reports an issue with RUNTIME_PREFIX
in Git, a bit similar to "git pull
broken" question:
I'm not sure whether
RUNTIME_PREFIX
is defined for you. But while nosing in theMakefile
, I did notice that prefix defaults to$(HOME)
. I suspect that this may be the cause of your problems.The simple answer is to put this in
~/.bashrc
:
export GIT_EXEC_PATH=/opt/local/libexec/git-core
If you want to find out more about what's going on, you'll probably have to recompile git using
port -d upgrade -f git-core
(or similar) and look closely at the build log to see where prefix is being set.
Incidentally,port cat git-core
shows heavy usage of${prefix}
.
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:
"Installation" consists of the following options:
- Keep the sources anywhere and use the full path to run the gitolite command.
- Keep the sources anywhere and symlink just the gitolite program to some directory on your $PATH.
- Copy the sources somewhere and use that path to run the gitolite command.
You can run the 'install' command in 3 different ways:
# option 1
gitolite/install
# option 2
gitolite/install -ln
# defaults to $HOME/bin, or use a specific directory:
gitolite/install -ln /usr/local/bin
# option 3
gitolite/install -to /usr/local/gitolite/bin
Old answer for gitolite V2:
Second, I prefer the "from-client method" method:
The advantage of this method is that it forces you to solve the ssh pubkey problem before attempting to install.
It works best if you have dedicated userids,
- one on the server for installing gitolite,
- and one on the client for administering it.
The disadvantage is that the admin user ends up with two keys
- one for shell access (that he started with) and
- one for gitolite access (which the script creates if needed).
So I like to create a ~/.ssh/config
file with the two different sets of parameters:
host gitolite
user git
hostname server
identityfile ~/.ssh/git
host gitadmin
user git
hostname server
identityfile ~/.ssh/id_rsa (myaccount public key)
The gitolite-admin is only visible for the first public ssh key:
C:\HOMEWARE\git>ssh gitolite
hello git, the gitolite version here is v1.5.9-25-ga10287a
the gitolite config gives you the following access:
R W gitolite-admin
@R_ @W_ testing
Connection to server closed.
With my account:
C:\HOMEWARE\git>ssh gitadmin
hello myaccount, the gitolite version here is v1.5.9-25-ga10287a
the gitolite config gives you the following access:
@R_ @W_ testing
Connection to mccprdgit10 closed.
So:
C:\HOMEWARE\git>git clone gitolite:gitolite-admin
Cloning into gitolite-admin...
remote: Counting objects: 16, done.
remote: Compressing objects: 100% (13/13), done.
remote: Total 16 (delta 2), reused 0 (delta 0)
Receiving objects: 100% (16/16), done.
Resolving deltas: 100% (2/2), done.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With