Migrate from gitosis to gitolite

I had searched around on the net for easy solutions to do this.. and to be frank.. didn't find anything super helpful that wasn't overly complex. So here is an easy way to do it. My system is an Ubuntu 10.04.3 but should be similar to many other systems.

1. Install gitolite (apt-get install gitolite). This is a good reference:

2. Edit your gitosis conf file to disable access to your current git repositories

3. Copy your gitosis repositories from your git repository location (/srv/gitosis/repositories) to the gitolite repository area (/usr/lib/gitolite/repositories). You don't need the gitosis-admin repo.

4. Update repository owner and permissions. So from inside the gitolite repository folder run:
chown -R gitolite:gitolite ./*
chmod -R 700 ./*

5. In each of the git repos you'll find a "hooks" dir.. you need to symlink up a few gitolite items. Run this inside each of the "hooks" dir of each repo:
ln -s /usr/share/gitolite/hooks/common/gitolite-hooked && ln -s /usr/share/gitolite/hooks/common/update

6. Update your gitolite-admin config file to include the new repos you copied into your gitolite repository location. Also specify user access and import any used keys into the keys folder of the gitolite repo.

7. Update your local git repo config files to properly reference the gitolite repos. Change your url path to use the gitolite user instead of the gitosis user.

For example, where you file says
[remote "origin"]
fetch = +refs/heads/*:refs/remotes/orgiin/*
url = gitosis@build.hirevue.com:hv.git

it should say:
[remote "origin"]
fets = +refs/heads/*:refs/remotes/origin/*
url = gitolite@build.hirevue.com:hv.git

8. Done!.. start using your new repos.