Consider hosting your own git repositories📄 OneThingWell.dev wiki page | 🕑 Last updated: Jul 8, 2022
In the light of the recent events, a lot of people are searching for alternatives to GitHub.
Hosting your own git repos is not as hard as people may imagine and maybe you should consider that as an option.
It boils down to this:
If you don't already have a Linux/BSD VPS, consider getting one (it'll be useful for a lot more than this)
Make sure that you have git installed (i.e.
apt/yum install git)
Make a directory and do
git --bare initthere
Congrats - you can now easily access your new repo over ssh:
git clone ssh://myhost/mydir
It may be also worth mentioning that now you have full access to things like git hooks (from which you have direct access to your whole system - this can be pretty useful).
For private repos, you don't need much more than this.
Making your repositories publically available is also not hard - there are many ways, the simplest one is probably to just pass HTTP requests from your web server (e.g. nginx) to
git-http-backend (I'll create a separate post for this).
Note: If you're new to all this, you may want to experiment in local VMs before you're comfortable with managing a real VPS.
Comments and suggestions
If you find this site useful in any way, please consider supporting it.