I use GitHub for most of my open-source projects, but sometimes I would like to set up some private Git repositories for non-open source stuff (like private data, files and backups). That’s a job for the Raspberry Pi !
Back in the days of SVN, administrating repositories was a pain in the ***, and it could have been the same with git if it wasn’t for a nifty little tool: gitolite.
Gitolite helps you create repositories, users, manage access, restrictions etc.. And all of this is done.. by using git itself. The configuration file (containing repositories description) is located in an “admin” repository, along with the public keys associated with users allowed to access these repositories.
This way, to add users, you only add their public keys, and edit the config file to choose which repository they’re allowed to access. To create a repository, simply add the name and people granted access to the conf file, and commit/push. It’s that simple.
You can find the instructions on how to setup your own private Git repositories at the Gitolite Readme page, on GitHub.