summaryrefslogtreecommitdiff
path: root/content/blog/2023/i-now-host-my-own-code.md
blob: ef3e1eada7e3664baa663a978f5c1ebcdac114d8 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
---
title: "I Now Host My Own Code"
categories:
- blog
abstract: Why I left Github.
year: 2023
date: 2023-01-08T16:08:51+01:00
draft: false
---
tldr: you can go to [git.sapka.me](https://git.sapka.me).

For years the first step towards every project was to create a GitHub repository. Rightfully so, as Github was the place for open source. They were years ahead of their competition when they launched. Heck, back then, git wasn't even the standard it is now. Time has changed. Microsoft bought them as another coy that would put them back in the minds of developers.

Nowadays, Github is just another social network. Pull requests, issues, and all that following shenanigans puts you further from the code by showing all that social coys in your face. Some even consider (and I am guilty too) of thinking about GitHub as the de-facto resume. We have put ourselves at the recruiter's mercy.

But the most significant cost of their hegemony is the transfer of code ownership. You may think that we still own everything you commit there. There are licenses! GPL! Well, ChatGPT may have clouded our memory, but just a few months ago, everything changed when Microsoft used this trust as a tool when they scanned the codebases to train their AI. Do we have any means to block them from doing it? Some even say that Microsoft ignored licenses and closed-source codebases were used. They have entirely breached trust. GitHub, a closed-source software owned by one of the biggest companies on Earth, used the good-heartedness of people worldwide for their own gain. No surprise that their AI will not be free - be it in a monetary or philosophical sense.

There is GitLab. GitLab is cool, is open source, and is based in Ukraine. They offer superior products while being a much nicer company. The entire FOSS community should move there. At least as long as GitLab stays open-source. We must be vigilant of any company, as they tend to become maleficent. Google was one of the good guys just a few years ago!

But I don't need all those shiny things that the big guys provide. Instead, I want to share my code. Everything else is extra and can easily be achieved on a small scale. Want a pull request? Just email me a diff. Issue? Hey, here's my email. Some pipeline? Since I own the server (aka "I have root access"), there is no problem with adding some hook with bash commands. 

Having your own Git server is extremely easy. One thing to keep in mind: GitHub has though us to think of Git as a centric system. We think of GitHub as a server and our machines as clients. But this is contrary to how Git works. There is no magical, turbo-important copy of the codebase. Every copy is as important as the other. We've given GitHub (and other providers) the master (main, or whatever we call it now) position.

This view has lots of practical pluses. If we want to cooperate, we need to decide who has the source of the truth. But it also made it more difficult to challenge the status quo of GitHub. Why bother when everything is already there? 

But enough rambling. Setting it all up takes about 10 minutes. Just follow the [official guide](https://git-scm.com/book/en/v2/Git-on-the-Server-Setting-Up-the-Server). If you want to have a permissions layer, you can use [Gitosis](https://github.com/tv42/gitosis) or [Gitolite](https://github.com/sitaramc/gitolite). I don't.

You may also want to have a web interface. Three solutions are very often recommended:
[Gitea](https://gitea.io/en-us/), which is a self-hosted GitHub
[CGit](https://git.zx2c4.com/cgit/), which I now use but am very Stagit-curious. 
[Stagit](https://codemadness.org/stagit.html), for all the ultra-neckbeards out there. It's used by [Suckless software](https://git.suckless.org/).
CGit installation is also quite simple. Just follow the [guide](https://wiki.archlinux.org/title/cgit) on Arch Wiki.

I will migrate all my repositories to [git.sapka.me](https://git.sapka.me) and treat GitHub as another company-mandated account.