This page describes a gitolite installation.


Copy public key to /tmp/

Install gitolite:

$ apt-get install gitolite

This creates a user gitolite and uses /var/www/gitolite as repository location. To change those settings reconfigure gitolite:

$ dpkg-reconfigure gitolite

Then delete the old user and repository location:

$ deluser gitolite
$ rm -rf /var/lib/gitolite/


Clone the admin repo:

$ git clone


To add an user just put the SSH public key into the keydir directory:

$ ls -1 keydir

It is possible to add multiple keys for a user. Name the public keys like <username>@<machine>.pub. For example:

$ ls -1 keydir


To add a new repostiory just add two lines to conf/gitolite.conf:

repo    my-project
        RW+     =   foo,bar
        R       =   www-data

Then commit and push the changes. This creates an empty bare git repository.

$ git commit -am "Added my-project"
$ git push

Then you can use and existing or new local git repository and connect it:

$ git remote add origin
$ git push origin master