Skip to main content

James Brind

Moving away from GitHub, in favour of sourcehut

“Programmers have the duty to encourage others to share, redistribute, study, and improve the software we write.” — Richard Stallman

Despite some questionable opinions outside of computing, Stallman was ahead of his time in recognising the threat to user freedom posed by proprietary software. He deserves credit for his seminal contribution to today’s open-source ecosystem.

As a heavy user of free software, I try to do my bit by sharing any useful code I write whenever I can. The most convenient way to do this for me and any potential users is one of the available web code hosting services. Compare:

  1. GitHub, a venture capital backed startup eventually bought by Microsoft for $7.5 billion, funded by upselling developer tools;
  2. sourcehut, a suite of open-source infrastructure tools funded by subscriptions to a hosted instance.

In this post, I shall explain my reasons for migrating all my personal coding projects from free repositories on GitHub to a paid account on sourcehut. It is light on properly technical content, but I think that sourcehut deserves some publicity.

Against GitHub

When using a free service, I always get the nagging feeling that I am the product. GitHub is a profitable company, so they must be extracting value from their user base somehow.

Specifically, in this case, GitHub offer a paid product called Copilot. This is a machine-learning driven autocomplete that (semi-reliably) writes entire functions based on natural language instructions in a comment. Copilot was trained on all publicly available code on GitHub. The issue is that Copilot reproduces some snippets of training data verbatim without citing a source. Of course, I am very happy if people use my code, but under the MIT license attribution is required.

Copilot violating my licensing is not the only behaviour I disagree with. They are quite happy to take down repositories in response to flimsy allegations of copyright violation. GitHub can well argue that they owe free users nothing, and code remains available entirely at their discretion.

GitHub web pages are not exactly lightweight: I recorded 71 network requests including 41 scripts to load the summary page of a repository, most of which is wasteful. Some of this is due to telemetry and tracking, some due to superfluous social or upselling features.

Although, at the lowest level, GitHub is based on the libre version control system git, their other features including issue tracking and pull requests are proprietary software. This acts as a lock-in that prevents large projects from migrating to competitors. It worries me that GitHub has grown to effectively possesses a monopoly on open-source software hosting—history suggests that Microsoft will not hesitate to abuse this market position: “embrace, extend, and extinguish”.

For sourcehut

Recently, I have made efforts to move to paid-for services instead of free ones (I migrated from GMail to Fastmail about a year ago and have had a very smooth experience). The exchange of value is much more explicit when money is involved: I can quantitatively assess what the service is worth to me, rather than set it against an abstract loss of privacy. I have grounds to complain if the service does not fulfil what I have paid for.

More importantly, incentives for a subscription-funded service align with the interests of users. Sourcehut want satisfied customers, who will renew their subscriptions and recommend their friends. The incentive for GitHub is to squeeze as much value from their free user base as possible; GitHub users are not customers, only have to view the service as tolerable, and until recently had no real alternatives.

The sourcehut code is entirely open-source, which confers a level of protection against many of the issues I have with GitHub. If sourcehut were to remove my repositories, I can cancel my subscription, fork their code and host my own instance. With access to the backend code, it is much easier to get data in and out and there is no lock-in. Pull requests are managed by the native git email workflow.

Sourcehut is a ‘by hackers, for hackers’ platform, with complete financial transparency. I know that my subscription stays within the open-source ecosystem, funding a sustainable long-term small business rather than a perpetual-growth arm of a large corporation.

Conclusion

The migration process was very straightforward. One can paste a GitHub clone URL into the clean and fast sourcehut web interface. Or, sourcehut will create a new repository automatically if you try to push to a remote that does not exist yet. I think it took longer to update all the GitHub links on this website to point to sourcehut!

I have confidence that my new choice of platform will be better managed in the interests of users, and I would like to see the open sourcehut supplant the proprietary GitHub.