It's literally far more trivial than you may think. (At least if you already own a VPS or a dedicated server.)
Basically, (1), add a git user, (2), configure .ssh/authorized_keys, and that's basically it!
To add a bit more security, you may also want to edit /etc/shells and add git-shell as a login shell, then change git user to use that shell, but that's entirely optional (and it'd actually make it less trivial to create add extra repos, so, for a single-user repos, you may want to delay doing that).
In all, the entire set of official instructions can be printed on like a single double-sided Letter / A4 piece of paper.
P.S. Actually, I guess it's 3 single-sided pages, but that's only because you'd be printing the example SSH key twice, which takes a quarter of an A4 each time, thus, the entire official instructions take almost 3 single-sided pages total.
Optionally, public repos: Set-up git-daemon in some /var directoy and do the git init dance there. Also touch the git-daemon-export-ok file to whitelist each repo for public serving. chown the repository directory to your own user so you can write there freely, while git-dameon can read and serve the contents to the world.
Everything is just dumping UI over a file system and executing command line stuff.
If you want that too take a look at forgejo or gitlab, both of which I use for self hosting. The setup is similar to setting up any other server that requires user accounts, a database, and exposed ports.
sudo apt-get install git
sudo dnf install git
(Etc)
In other words, the server is sshd.
Enjoy!
My question was posed because I believe the post did not read the original request carefully.
My experience is managing over a hundred thousand vms at once across multiple countries, and have managed large fleets of tens of thousands or hundreds thousand+ for decades. This is old hat.
My desktop runs Linux. My laptop runs Linux. My phone runs Linux. The phone is the only one without a running SSH server. I'm pretty sure the openssh server is also a default package in Fedora Workstation, it's just got the service disabled by default unless you flick on a check box in the Gnome window.
Windows Server also supports SSH, and has several shell options.
I couldn't answer for any Apple device.
I guess my experience is narrow, though.
Hey, how many git servers do you know not running Linux? That's an interesting question!
Edit: Curious what you think both GitLab and GitHub run on, and if those have ssh enabled or not.
ssh.
Why?
Certificate expirations suck.