Git clone git @myserver: gitolite-admin does not work

I am trying to start the git server repository. I installed a guitarolite

when starting git information on ssh, the server responds

ssh git@myserver info hello Brian, this is git@hepide01pep1 running gitolite3 on git 1.6.3.2 RW testing 

When trying to clone the gitolite-admin repository, the following error appears

 git clone git@myserver :gitolite-admin Cloning into 'gitolite-admin'... FATAL: R any gitolite-admin Brian DENIED by fallthru (or you mis-spelled the reponame) fatal: The remote end hung up unexpectedly 

The same thing happens with this syntax

 git clone ssh:// git@myserver /gitolite-admin Cloning into 'gitolite-admin'... FATAL: R any gitolite-admin Brian DENIED by fallthru (or you mis-spelled the reponame) fatal: The remote end hung up unexpectedly 

Can you tell me any helpful hints? I checked the answers here and on the Internet, but did not find anything that helped me in the future.

+7
source share
3 answers

gitolite-admin is only available with the public key named after the git account used for the gitolite server.

You use your brian.pub by default, which gives you access to the testing.git repo.

you need to define the $HOME/.ssh/config file on your local workstation in order to write ssh parameters to use the right key.
See " gitolite: you can connect via ssh, can not clone .

 ~/.ssh/gitolite.pub ~/.ssh/gitolite 

Then I define the configuration file: ~ / .ssh / config with it:

 host gitolite user git # replace it by the actual git user for the gitolite server hostname server.com identityfile ~/.ssh/gitolite 

The clone will work:

 git clone gitolite:gitolite-admin 

OP macbert confirms:

I renamed the key to git.pub , ran gitolite setup -pk git.pub and removed the old brian key from .gitolite/keydir .
After that, I got git clone git@myserver :gitolite-admin :

 Cloning into 'gitolite-admin'... remote: Counting objects: 15, done. remote: Compressing objects: 100% (12/12), done. remote: Total 15 (delta 0), reused 0 (delta 0) Receiving objects: 100% (15/15), done. 

So, with the correct default key, ssh git@myserver info should this time display the correct access for gitolite-admin repo in the "hello" message.

+8
source

The accepted answer is good if you just configure gitolite, but if you are a new user for an existing installation, you will get the same error as in the question if you have not been added as an administrator.

If you have access to the shell on the server, gitolite lives on, log in and switch to the user who uses gitolite - usually called git .

After logging into the gitolite user, go to the conf file and give yourself RW + rights in the gitolite-admin repository. Gitolite conf is usually located in /home/git/.gitolite/conf/gitolite.conf (if the username is git ). Grant permissions for a guitar user named Peaches :

 repo gitolite-admin RW+ = OriginalAdmin Peaches 

Save the file and run the setup from the command line, still as a gitolite user:

 gitolite setup 

If you configured the user correctly, you can clone now.

For more information on adding users, see the documentation .

+13
source

Usually bare git repositories use the name .git. Please try to do

git clone git@myserver :gitolite-admin.git

0
source

All Articles