Suresh Payankannur

Thursday, May 24, 2012

Migrating from Gitosis to Gitolite on Ubuntu 12.04

Ubuntu 12.04 (Precise Pangolin) removed the support for Gitosis Git server. I have been using to host my projects locally. This forced me to look for alternatives. This link discusses the alternatives.

I decided to go ahead and use Gitolite, which also provides migration from Gitosis. Here are the steps to migrate from Gitosis to Gitolite.

git-server: Where the git repository is hosted
git-client: A windows git client. I am using command line git from Cygwin
gitadmin: The user account under which the git repository is managed.
gituser: The windows user name under which the git client operations are performed.

Copy the existing public key to the server.
git-client> scp /home/gituser/.ssh/ gitadmin@git-server:/tmp/  
Disable the gitosis and install gitolite
git-server> sudo apt-get install gitolite
git-server> su gitadmin
git-server> cd /home/gitadmin
git-server> mv .ssh/autorized_keys .ssh/autorized_keys.back
git-server> cp -r respositories repositories.gitosis
git-server> cd repsitories/gitosis-admin.git/hooks
git-server> mv post-update post-update.sample
git-server> cd /tmp
git-server> gl-setup
Make changes to the gitolite configurations
git-client> git clone git://
git-client> git clone gitadmin@git-server:gitolite-admin.git
git-client> gitolite/convert-gitosis-conf < gitosis-admin/gitosis.conf >> gitolite-admin/conf/gitolite.conf
git-client> cd gitolite-admin/conf
git-client> vi gitolite.conf
Modify the gitolite.conf and delete the gitosis-admin repo. Also modify any user names which do not have a dot '.' in them as discussed in the migration document here: In my setup, the sample configuration will look like:

Copy the existing keys
git-client> gitosis-admin/keydir/*  gitolite-admin/keydir
Delete any duplicate keys as discussed here:

Commit the changes
git-client> cd gitolite-admin
git-client> git commit -am 'Moved to gitolite repository'
git-client> git push

1 comment:

  1. I really appreciate the kind of topics you post here. Thanks for sharing information that is actually helpful. Good day!


Blog Archive

Scroll To Top