1. 22
  1.  

  2. 3

    Some years ago I wrote something similar for CentOS 7 + git + cgit + SELinux. I’m still planning to update it and write another for Debian 10.

    1. 1

      This is a very nice write-up, thanks! I might use a very similar setup soon and this would save me some time. I also appreciate how you name downsides to this solution as well as point to sourcehut, which is definitely also a good solution for git hosting.

      1. 1

        This is very similar to how I’ve been running my own personal git server for years on my VPS.

        The git repositories live in the home directory of a user named git. My SSH key is in the authorized_keys file of that account. When I want to create a new repo, I have a shell function that logs in and runs the right command so that I don’t have to relearn how to do it every few months.

        I use cgit for a convenient web interface, but I may take a look at stagit since I’ve never been fully comfortable around the idea of a persistent CGI daemon written in C. (Even though it is completely hidden behind HTTPS and HTTP Basic Auth.)

        1. 2

          I like cgit a lot. I sometimes think about changing to it, but a static site is something hard to give up for me.

          If you want a similar experience to cgit and you have time, you can always try and program it yourself. I did that to add Mardown rendering for the READMEs which was something I really missed and I’m pretty satisfied.

        2. 1

          I wrote a similar tutorial on tilde.team a while ago. It’s quite amazing that git clone can work via GET requests only, so for a public, read-only remote url, git-daemon is not even needed, which is why any pubnix server offering public web pages can be used to serve git repositories, along with a stagit interface. I just love how simple git can be.