Setting up Gitolite on Linux

This article has the definitive guide for setting up Gitolite on Linux from the source project from Github. I followed it step by step and what do you know, it all worked great.

To add new repos and users, pull down the gitolite-admin project from your newly created gitolite server:

git clone gitolite@your_server:gitolite-admin.git

Edit the conf/gitolite.conf file and follow the examples that are already there:

repo    reponame
        RW+ = username

Add the public key file for the user to the keydir dir (file name matching the username you just added to the gitolite.conf file, and then push back the changes:

git add . 
git commit -m "added new repos and users" 
git push origin master

To add an existing new project into the repo, cd into that project and add a new remote:

git remote add origin gitolite@your_server:project_name.git

where project_name matches a repo name that you added earlier to the gitolite.conf file.

Push it up to the repo:

git push origin master

You’re all set.

Leave a Reply

Your email address will not be published.

This site uses Akismet to reduce spam. Learn how your comment data is processed.