Ubuntu: How to install gitolite3 on ubuntu server LTS 14



Question:

I am trying to install Gitolite3 on Ubuntu server LTS 14 x64, using the git docs.

First I created a user called git as :

sudo adduser \  --system --shell /bin/bash --gecos\   'Git SCM' --group --disabled-password git  Adding system user `git' (UID 120) ...  Adding new group `git' (GID 129) ...  Adding new user `git' (UID 120) with group `git' ...  Creating home directory `/home/git' ...  

Then I generated the keys:

wdd@ubuntu-server:~$ ssh-keygen -t rsa  Generating public/private rsa key pair.  Enter file in which to save the key (/home/wdd/.ssh/id_rsa):  Enter passphrase (empty for no passphrase):  Enter same passphrase again:  Your identification has been saved in /home/wdd/.ssh/id_rsa.  Your public key has been saved in /home/wdd/.ssh/id_rsa.pub.  The key fingerprint is:  24:76:b9:d1:15:63:71:00:5b:73:96:29:e2:be:4d:63 wdd@ubuntu-server  The key's randomart image is:  +--[ RSA 2048]----+  |          ..X++o |  |         o.=.*o  |  |      o =.o. .   |  |     . + o.      |  |        S.       |  |          . E    |  |           = .   |  |          . .    |  |                 |  +-----------------+  

Then executed the following commands:

$ git clone git://github.com/sitaramc/gitolite  $ gitolite/install -ln      # assumes $HOME/bin exists and is in your $PATH  $ gitolite setup -pk $HOME/.ssh/auhtroized_keys  

And this should be the default setting of the gitolite should be ok.

So I go on my windows client machine and want to clone the gitolite-admin repo by:

git clone git@gitserver:gitolite-admin  

But it asks me for password,

wdd@MUSAHAIDARI-PC /c/Users/wdd  $ git clone git@gitserver:gitolite-admin  Cloning into 'gitolite-admin'...  git@gitserver's password:  

Here I think we are not supposed to be asked for password, if so what is the password? Since I have not set any password.

I need to mention that I could SSH without password from my PC to Linux-server


Solution:1

I got the solution to the problem. It seemed that git could not find the private keys to login, so I created ~/.ssh/config containing:

Host gitbox      User git      Hostname 192.168.0.103      Port 22      IdentityFile ~/.ssh/gitolite  

Of course you need to change the credentials. Then gitbox is used for loggin in credentials.

 git clone gitbox:gitolite-admin  

The problem is solved. Also please keep in mind for each new user, a new entry in this file will be created to link the key files.


Note:If u also have question or solution just comment us below or mail us on toontricks1994@gmail.com
Previous
Next Post »