When I learned about branching and merging in Git a few years ago I was hooked. Then the honeymoon came to an end and I realized that sharing a private repository with someone required giving them SSH access. Ouch! Fortunately GitHub came along and solved the problem well enough that the idea faded into the back of my mind.
Then one day I needed to share a private repository with someone just for fun and didn’t think that paying GitHub was justified. I was pleasantly surprised to see how many people have solved the private repository access issue.
If you’re looking to host your own private Git repository this list of resources should get you started:
GitLab is a new open source project with features similar to GitHub. It has a nice looking user interface and repository access control via SSH public keys.
Gitolite is another open source project for administering a centralized Git server with fine-grained access control. It doesn’t have a user interface so it’s purely for access control. A similar project is Gitosis.
If you want something even simpler Richard Taylor has written an article with instructions for setting up SSH to control access to Git.