Regarding git hosting
Published on 2020-08-27 by flewkeyWhen it comes to online services, many people look past simple solutions and jump to the large pieces of software and complicated solutions. One case of this which I see on a regular basis is git hosting, and I don’t think that most people understand how simple it is to host git repositories.
Many people think that hosting git is hard because they believe that it’s
necessary to install and configure a code forge on their server. They will
usually install GitLab, which is
“robust”
and definitely not overkill for hosting a handful of personal repositories.
There are also a few people who install less gross robust
git services like Gitea and SourceHut
to host their projects. The thing is... they really don’t have to.
git clone --bare repo repo.git && scp -r repo.git name@server:/srv/git
Those are the only commands needed to run to host a git repository on any server
with SSH access. The path doesn’t even have to be /srv/git
. As long as the
URI (e.g. ssh://name@server:/srv/git/repo.git
) points to a bare git repository
which the user has read access to, they can pull from it. With write access,
they can even push to it. Amazing.
For more information on using git with your server, read the relevant chapter from the Pro Git book. It will explain how to set up a more limited “git” user for SSH, use the git daemon, rig up git-http-backend on your webserver, and even use GitWeb to show a web UI. It’s not much harder the simple setup above.
There are also other projects which can complement git hosting. If GitWeb isn’t fancy enough, there is also cgit. Issue tracking can be handled with Trac, and e-mail can be used to accept patches. At that point though, using a proper code forge might be a more suitable option.
Self-hosting git really isn’t that important, nor is there anything wrong with sticking all of one’s projects on GitHub. (Most of mine are on the SDF GIT Society anyways.) However, I’ve seen too many people purchase subscriptions from GitHub for the privilege of private repositories. I’m tired of seeing unused GitLab and Gitea instances as well. When setting up a code forge, make sure that it’s necessary.
Articles from blogs that I like
Against the Censorship of Adult Content By Payment Processors
This is a furry blog, where I write about whatever interests me and sign it with my fursona’s name. I sometimes talk about furry fandom topics, but I sometimes also talk about applied cryptography. If you got a mild bit of emotional whiplash from that sen…
From Dhole Moments
Published on July 24, 2025
Question #35: What the F*ck is Photography’s Founding Myth (And Why the F*ck Should We Care)? Episode Two
Onward to Colour With the previous Question #34, we began a discussion of “Seeing X in Y”. Given that we have at least a fundamental grasp of the idea that a pictorial depiction is not an “innate” experience, but rather a cognitively mediated construct, w…
From The Hitchhiker's Guide to Digital Colour
Published on May 7, 2025
Why Build?
"The Centre of the Universe is of course that marvellous land known as Fraggle Rock. It is thus called because it is A Rock and Fraggles Live There. Fraggles are a noble race. Fearless, dignified, intellectual, they represent the very pinnacle of civil…
From codersnotes.com
Published on June 3, 2022
Generated with the spectacular power of openring