Update: I just found out about the (relatively) new kid on the "self-hosted Git hosting" block; Gogs. I'll try it out soon and report my findings.
I've just migrated my personal set of private git repositories from an old installation of GitLab to gitolite. GitLab is quite a resource-intensive program and I was using none of the features, and it can be quite difficult to upgrade unless you use their Omnibus packages (pre-built packages that contain all the stuff needed to run GitLab).
What is GitLab?
GitLab is essentially an open-source version of GitHub. It has been around for a few years and started off considerably lighter-weight than it is now and over time has purposefully recreated every feature of GitHub. Today its feature-set probably surpasses GitHub.
It's a Ruby on Rails application that uses a few extra pieces of infrastrcture: PostgreSQL, Redis, Sidekiq, Unicorn, nginx and gitlab-shell. All together it's quite a memory-hungry application and has a lot of moving parts.
What is gitolite?
When I first started using GitLab, it was pretty much just a web interface for gitolite. gitolite is a tool that makes it really easy to host git repositories on a central server with fine-grained access control using SSH without forcing you to create a real UNIX user for every person you wan't to give access to your git repositories. In essence, it is a tool to allow you to have git remote URLs that look and work much like GitHub (e.g.
email@example.com:your-project.git) and that can be shared with others.
You manage permissions and repositories by cloning a special meta-repository called
gitolite-admin and editing the plaintext files inside it, then pushing them back up to your server.
Which should you use?
gitolite is great for providing a small team with centralised access to git repositories. It uses a process people are familiar with (SSH keys for access, remote URLs that look like GitHub). It is also easy to set up on a Linux VPS (installation is about 4 commands). However it is not a replacement for an organisation account on GitHub with private repositories. It provides no additional features around repositories such as issue tracking, a wiki, web-based browsing of commit history and files.
GitLab is great if you want a lot of private git repositories but don't want to pay GitHub for them. It gives you all the features you expect, but is also pretty resource intensive; you'll need a reasonable VPS to run it and you'll need to allocate some Ops time to managing it and keeping it up to date, even with the Omnibus packages.
For me, I swapped to gitolite because I never accessed the web interface for GitLab. I had 8 repositories that I just need centrally stored, I didn't need the collaboration tools GitLab provides. However at work we use GitLab because being able to browse commit history and files in the web interface is invaluable.
What do you use? Are there any hosted providers out there that beat both GitHub and GitLab?