Well we all know that git is a great tool for managing your code, but what about if you want to manage git access to your various repos. Welcome to gitolite available under a Creative Commons Attribution-NonCommercial-ShareAlike 3.0 Unported License.
"Gitolite allows you to setup git hosting on a central server, with fine-grained access control and many more powerful features." gitolite.com
For help in setting this up I found a useful article that explains a little about how it works here:
One thing of note is that once setup permissions can be one of these values:
- R: Read only access
- RW: Can read or push new changes. Cannot delete refs that exist on the git server already.
- RW+: Can push destructively, or delete refs on the server.
- -: Has no access to the specified content.
How To Administer Gitolite
Back on your local computer, you can begin administering gitolite.
If you do not already have git installed on this computer, you need to install it with:
sudo apt-get install git-core
First, we need to clone the gitolite information from our git server to our local machine. Personally I created a local folder somewhere alongside my other projects called gitolite-admin and then:
git clone git@git_server_IP_address:gitolite-admin .
This will create a new directory called
gitolite-admin within your current directory. Here, we can make changes to our access policies and then push those changes to the git server and the setting are automatically compiled and git access settings for gitolite updated.
Pretty cool hey?