Live data from Hacker News

Self-Hosting Git

peppe.rs

41–50 of 71 posts

Re: Self-Hosting Git

#41
post #35

Recently I just finished tearing down all my self-host services. Things facing the public internet might be convenient, but heck if I want to face that security nightmare in an ongoing way. All my git repos now live in a "git" folder I share amongst my fileserver and other machines with syncthing, hosting only the bare repos. If I need pull requests or issue tracking, it's got to be something that goes with the repos…

This, 1000%. There's good reason infrastructure-as-a-service has become so popular: self-hosting _sucks_. Not only is there the constant and every-growing security nightmare for which companies like GitHub have entire world-class teams, but let's not forget the fact that self-hosting means you're a sysadmin again. Which _sucks_.

The interesting write-up would be the one describing what the experience has been like 6-, 12-, 18-months down the road. It's easy to be optimistic and idealistic at the outset, much more difficult to remain so in the face of the day-to-day realities.

Re: Self-Hosting Git

#42

Does anyone have any thoughts on self-hosting https://sourcehut.org/ ? It seems like a very interesting option to me

I wouldn't. The last time I tried to use their software I asked if anyone had any insights with how to use it in Docker (much of it is written in Python) and the response I got was cringe worthy. I'm just some person on the internet so take that for what you will.

Re: Self-Hosting Git

#43
post #35

Recently I just finished tearing down all my self-host services. Things facing the public internet might be convenient, but heck if I want to face that security nightmare in an ongoing way. All my git repos now live in a "git" folder I share amongst my fileserver and other machines with syncthing, hosting only the bare repos. If I need pull requests or issue tracking, it's got to be something that goes with the repos…

(nearly) all my projects live in an account on uberspace.com. This is a German shared hosting provider with quite great offerings.

You get a shell (ok, no root/sudo because shared hosting) with 10GB space, databases and what not. A vibrant community providing installation resources for a massive amount of tooling: https://lab.uberspace.de/

I am in no way affiliated to them just a happy customer for 10+ years now.

btw: it is pay what you like, but min 1€ per month.

Re: Self-Hosting Git

#44
post #31

As someone who had countlessly saying [0] this to at least to either setup a self-hosted Git repository or use that as a backup almost a year ago since GitHub made teams free [1] I do welcome anyone moving from GitHub to a self hosted solution. There are are several open-source software projects that have been doing the same thing but on a self-hosted solution. GitLab instance like (GNOME, GTK, etc) or cgit (wireguar…

Linux has even used Github once as a backup solution for hosting the main repo, during a very short period of time.

The workflows git has been developed for in the first place has little to do with the non-git and mostly walled garden feature provided by hosted Saas, being Github or even Gitlab.com

Of course some projects find it convenient, but I'm not impressed by the embrace/extend approaches, esp when it shapes the technical practices because of workflow limitations existing for mere business needs: if a merge request is not possible from and to any host, that's really a big loss - and that's particularly important because of geostrategic restrictions (mainly in practice for now: the US "randomly" banning other countries, or the reverse: countries "randomly" banning various, mainly US, services)

Re: Self-Hosting Git

#45
post #42

Does anyone have any thoughts on self-hosting https://sourcehut.org/ ? It seems like a very interesting option to me

I wouldn't. The last time I tried to use their software I asked if anyone had any insights with how to use it in Docker (much of it is written in Python) and the response I got was cringe worthy. I'm just some person on the internet so take that for what you will.

> the response I got was cringe worthy

How so?

Re: Self-Hosting Git

#46

Probably a naive question, but is a git server required? Could one imagine a git repository stored as static files (e.g. in a cloud bucket), and the client then runs git the functionality. Or, a "serverless" git, with cloud functions? (I guess concurrent writing would be an issue.) EDIT: I don't mean ssh'ing to a server with git installed on it. I was thinking of a git-based protocol but based on static files. But th…

Yes! For one, there is git via email, which is a oft overlooked built-in feature of git. Discussion (I am not the author) [0]

[0] - https://drewdevault.com/2018/07/02/Email-driven-git.html

Re: Self-Hosting Git

#47
post #20

Interesting! recently I started self-hosting my personal repos using gogs ( https://gogs.io/ ) it’s really lightweight, and I can evn run it in an arm64 box (the same one I use for my NAS). If you’re looking for a more complete yet still lightweight alternative, give gogs a look.

Also worth checking Gitea ( https://gitea.io/en-us/ ) which is a popular fork of Gogs.

Some background for those that may be not know which one to choose. Gitea forked a while back due to the belief that the maintainer of Gogs was not moving fast enough. I can't speak for the quality, but the difference in activity level is extremely evident as the following shows:

Gogs

https://public-001.gitsense.com/insights/github/repos?r=gith...

Gitea

https://public-001.gitsense.com/insights/github/repos?r=gith...

Re: Self-Hosting Git

#48

Does anyone have any thoughts on self-hosting https://sourcehut.org/ ? It seems like a very interesting option to me

Depends on your skills:

Sourcehut assumes you know your way around Linux and want to spend the time to understand how to host the services you need. The expectation will be that, if you run into issues, you're willing to debug and submit patches if necessary.

Alternatives like Gitea/Gogs are hostable as essentially single binaries and have clear guides on how to host on Docker. They're less feature rich, but more widely used in a self hosting context.

If you're looking for a middle ground, I've had good luck hosting Gitlab but it will consume more server resources than anything mentioned thus far and be a little more difficult to keep up to date

Re: Self-Hosting Git

#49
I've been self-hosting https://gitea.io/en-us/ with no issues. One-liner to spin it up in Docker; exposed on the LAN only and easily accessible from anywhere with an SSH tunnel thru my bastion. Trouble-free workflow and I feel safe knowing my source code doesn't live on a computer somewhere in someone else's closet[1]

[1] - https://xkcd.com/908/

Re: Self-Hosting Git

#50
Just use rsync.net. All you really need is a secure SSH accessible system with the git suite. Publishing a website is not necessary since you can browse code locally through git-web.
Post reply on HN