Installing a gitolite server on Ubuntu

Gitolite First install git server if not already installed

sudo apt-get install git-core

introduce yourself to git

git config --global "Your Name"
git config --global ""

Install gitolite server

sudo apt-get install gitolite

Create a user for gitolite

sudo adduser --system --shell /bin/bash --group --disabled-password --home /home/git git  

On local machine copy your public key to the /tmp directoy

cp ~/.ssh/ /tmp/$(whoami).pub

or from a remote machine

scp ~/.ssh/ you@git-server-IP-address:/tmp/

Switch to the git user and import the administrator's key into gitolite environment

sudo su - git
gl-setup /tmp/*.pub

Now exit and copy the admin repro

git clone git@
cd gitolite-admin

Configure the admin repro and commit changes

Add group called dev and allow users to read and write to myproject repro

repo    gitolite-admin
     RW+     =   admin
@dev = user1 user2
repo    myproject
     RW+     =   @dev

Add the two users public keys to keydir directory as

Commit the changes

git add keydir/
git add keydir/
git commit -a -m "Added Dev Group and user1 and user2"
git push

Login from user1 workstation to test it works.

git clone git@IP-Address-of-git-server:myproject.git

Good Luck!

Hassan El-Masri

Network Consultant Engineer

comments powered by Disqus