These github alternatives give you powerful git hosting, on your own terms
By: +David Herron; Date: January 8, 2018
Git is a powerful source code revision control system, letting teams large and small track changes between team members. Github is an excellent service for hosting Git repositories. The Github corporation offers powerful free features, and even more powerful paid features, and software teams around the world are using Github to collaborate. But what if you want to, or must, host your repositories yourself? Some corporate security teams require no use of 3rd party services. Are you stuck using bare git?
Fortunately several Github alternatives exist giving you most of the capabilities of Github, but with open source software you can install on your own hardware.
For example I have several personal repositories that are not to be visible to the public. One is the repository containing the AkashaCMS source to build this website. I don't have the budget necessary to pay Github for private repositories. Therefore, I have tried several ways to host the Git repositories elsewhere.
For example it's easy to set up a Git repository on a shared hosting account. The trick is using an SSH URL to access the repository. But, a bare Git instance doesn't have any of those nice features we enjoy on Github. Most importantly, it doesn't support the Pull Request.
The following Github alternatives provide very similar functionality, and support Pull Requests.
This is an enterprise-quality Github alternative that includes a Continuous Integration system. It's available as a hosted application under terms similar to Github - namely, a Freemium model where anyone can setup a free account to host Git repositories, and you can pay money for Enterprise features.
The Gitlab corporation is working hard to lure over open source projects from Github. Some are unsatisfied with the features offered by Github, and Gitlab is doing their best to appeal to those needs.
For example, Gitlab supports an extensive array of project management features. I haven't used these features, but it looks like they've incorporated many agile project management tools into a project planning area. No need to rent a service like Pivotal Tracker, it's all in Gitlab.
One feature I have used is the built-in continuous integration system. Gitlab supports integrating several build servers, and kicking off build jobs on various triggers. It's possible to integrate this with code quality and security testing processes. No need to set up a separate Jenkins or Travis CI instance.
Gitlab has a built-in Docker container registry.
There's many more features, and you can either install it on your own machines, or use their cloud service.
I installed the Docker version, and used it for awhile. It's very easy to install Gitlab using Docker.
Gogs stands for Go Git Service. As the name might imply, it is a Github clone written in Go. I currently have Gogs installed alongside a Jenkins instance I use to drive builds. Both are installed in Docker containers, and are running in an Intel NUC sitting on my desk.
The main attraction to Gogs isn't the extensive featureset. While it offers a large portion of Github's capabilities, it is not trying to meet-or-beat that featureset. Instead, the goal is a lightweight alternative that can easily run on low-end hardware.
For example, my first trial of Gogs was on a Raspberry Pi 3. While it runs on that hardware, the result isn't very good. So I installed Gogs on the NUC on my desk to get better performance.
The featureset covers a significantly large subset of the Github features. I've only used it on my own, and have been satisfied.
I'm using Gogs over Gitlab because the editor in Gogs is nicer. While most of the time we do not edit repository content in the repository viewer service, sometimes we do. In some cases it's useful to use the repository viewer as the primary tool for editing the content. In that case, the better editor in Gogs is preferred.
Another system, in this case written in Java. I have never used GitBucket, but the featurelist on the website is very short:
- Repository Viewer
- Issue Queue
- Pull Request
- Plugin system
It appears to be a very stripped-down system that offers just the essential features. There is a plugin system with several 3rd party add-ons available.
Several others are listed here: https://alternativeto.net/software/github/?license=opensource