simulacrum party

Finding a New Git Host

I've been trying to find somewhere other than GitHub to host my git repositories for a while now. There are a lot of options so I'd like to take a few minutes and run through their pros and cons. This article is simply a journal of my own experience with various git hosts, and should not be taken as being instructive or prescriptive.

First, I should talk about why I don't want to use GitHub. It's easily the most obvious answer to this question. Most popular open source projects are developed on GitHub, and most open source developers are at least somewhat active on GitHub. Many proprietary software projects also use GitHub. It has a rich feature set and a generally clean, friendly UI. So what's wrong?

Well, first off, I'm uncomfortable with how deeply coupled the open source/free software ecosystem is to a closed source, proprietary product. When the Microsoft acquisition happened, there was a lot of debate about how sincere Microsoft's recent surge of participation in open source is, but I think that's missing the point. The problem is not necessarily Microsoft specifically, but that the center of open source software development is run by any company for profit. Microsoft has a mandate to generate profit for its shareholders and there could come a day when GitHub isn't justifying its cost and they pull the plug. As a decentralized protocol, git is supposed to prevent exactly this kind of fragile centralization and yet here we are. I would prefer to use a product that isn't vulnerable to the fickle whims of capitalists.

That said, I do take issue with Microsoft specifically as well. Considering their lucrative contracts with both ICE and the Pentagon, Microsoft are directly involved in imperialism, death, destruction, kidnapping, and murder and I cannot support them in good conscience. Frankly, quibbling about their intentions toward open source software seems petty and myopic in comparison. Some might try to say that GitHub is a relatively autonomous entity under the Microsoft umbrella, but they had their own issues even before the acquisition. The first I heard of it was when I saw on Twitter that GitHub had invited the CTO of ICE to speak at their Constellation conference, as well as a representative from Northrop Grumman, a major defense contractor. After a public outcry, they dropped the speaker from ICE, which was the main point of contention, but not the speaker from Northrop Grumman. I don't think we should allow these people into open source spaces and I don't want a company that works with them to profit off of my work.1

So what are the alternatives? The name you tend to hear most often after GitHub is GitLab. Like GitHub, they're a private corporation, but their code is open source. They also seem to treat their employees pretty well and have beaten GitHub to market on a few nice features (CI/CD, free private repositories, maybe more). One nice thing about GitLab is that you can also stand up your own instance on your own server and that alone really sets it apart from GitHub for me. Ultimately, I'm looking for something that's not for profit, but GitLab is a respectable option.

After GitLab, Bitbucket is probably the next most commonly mentioned git hosting service. It's a decent product, and not quite as bloated as some of Atlassian's other products like Jira and Sourcetree. Again, it's closed source and run for profit by a private corporation, so it's not really an option for me but I thought I would be remiss to not mention it at all.

One more recent entrant into this space is Sourcehut. Sourcehut is open source and you can either self-host or use the hosted instance. It has a clean and minimal interface that I prefer to the GitHub style. I got excited about a new open source git host and quickly transferred some repositories, but have kind of soured on it due to the author's preference for an email-based patch workflow rather than pull requests. This has the advantage of not needing contributors to register for a Sourcehut account, but personally I find the email workflow extremely intimidating and I think a lot of potential contributers will as well. The pull request system is confusing when you first encounter it, but I think it's ultimately a friendlier system. The author has talked about building a sort of web interface on top of the email workflow which is intriguing but at least until then, I think Sourcehut isn't quite right for me.

The last option I'll talk about here is Gitea, an open source, self-hosted solution. Unlike GitLab and Sourcehut, which you can choose to self-host or not, Gitea has no canonical hosted instance, so you must run it yourself. It's clean and fast, with an interface very similar to GitHub, and easy to deploy. I created a one-click Gitea droplet on Digital Ocean, and aside from having to stand up an Nginx reverse proxy and my own Let's Encrypt configuration2, it was a breeze to get going. I love that I fully control my git server, but the downside of that is that anyone who wants to contribute to my projects needs to register for an account on my instance, which is obviously not ideal. I saw that there's some work being done on federating Gitea via ActivityPub, which would certainly improve the situation. I'm going to try it out for the time being but I don't know if it's ultimately the right solution.

I don't know what I'm going to do in the end. I meant what I said at the beginning - this article is simply an exploration of the domain, and I don't have a good answer to this question. I suspect that the perfect git hosting solution doesn't exist yet. I've spent some time investigating some of the various options and they all have serious downsides. Fortunately, I don't have any popular projects with a lot of contributors, so I'm free to jump around and try this or that for a while and move on. I'm sure there are products I haven't tried and I would love to hear about them! Feel free to reach out via email or Twitter.


  1. It's hard to avoid supporting ICE collaborators though. I keep meaning to find a replacement for Palantir's TSLint but they're such a standard tool in the TypeScript ecosystem, and I'm so easily flustered by JS tooling that I haven't wanted to mess with something that works.

  2. There's a section in the documentation that implies that Gitea can configure Let's Encrypt automatically, which would be great. I couldn't get it to work, but setting up Nginx is easy enough so it wasn't a big deal to me.