Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

gitlab error cloneing git@localhost:gitolite-admin.git from the installation guide

i try to setup gitlab and follow the installation guide on https://github.com/gitlabhq/gitlabhq/blob/stable/doc/install/installation.md.

My curent problem occurs when doing a smoketest on gitolite, with the following command

# Clone the admin repo so SSH adds localhost to known_hosts ...
# ... and to be sure your users have access to Gitolite
sudo -u gitlab -H git clone git@localhost:gitolite-admin.git /tmp/gitolite-admin

The problem is the access syntax (repository notation) for the git repository: git@localhost:gitolite-admin.git

It works with the following repository notation, but i have to enter a the password for the user git: sudo -u gitlab -H git clone git@localhost:/home/git/repositories/gitolite-admin.git /tmp/gitadminab

somehow the rsa-key is not correct setup for localhost and the shortcut to the repository does not work, as I have to specify the full path to the git repository.

How to fix that?

cheers -- jerik

like image 685
jerik Avatar asked Jul 31 '26 07:07

jerik


1 Answers

I confirm that

  • if you are using the full path of the gitolite-admin repository, you simply are bypassing gitolite entirely: see "why bypassing gitolite causes a problem".
  • if you are entering the user git "password", that means the public key isn't recognized at all, so make sure the gitolite installation step (which was: sudo -u git -H sh -c "PATH=/home/git/bin:$PATH; gitolite setup -pk /home/git/gitlab.pub") did properly register that key in ~git/.ssh/authorized_keys file.
like image 153
VonC Avatar answered Aug 02 '26 01:08

VonC



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!