Follow

Are there any git hosting services that allow custom domains?

Since I'll be getting off GitHub and don't want to self host, that's a killer feature I'd pay for.

Β· Β· 5 Β· 7 Β· 3

@tychi What for? I could understand custom domains for email and websites, but not much else.

@sirvertalot to have a single access point for accessing and sharing my code publicly. For example, I've got a dotfiles repo that I started on GitHub and then moved to sourcehut. I need to remember their specific paths to the repo to clone it on a new machine.

If I had git.tychi.me/backpack, I can guarantee for the rest of my life that's where my repo can be cloned from.

@tychi hmm, I like the idea but I'm not sure it's trivially possible, because it's not just the hostname, it's also the path after the colon that changes. For instance:

git@git.sr.ht:~stchris/passage
vs
git@github.com:stchris/passage.git

So your idea would be to be able to `git clone git.tychi.me/backpack`? In that case you would probably need a permanently running proxy daemon which speaks the `git://` protocol, I guess.

@tychi ok, now I'm reading up on it (git-scm.com/book/en/v2/Git-on-) and it turns out that the git protocol is only for public, read-only access. So you probably want ssh and I don't see a way to rewrite those URIs. Am I missing something?

@stchris @tychi You should be able to configure a subdomain to point to the repo location.

@garritfra @tychi sure, but DNS only gets you so far, unless I'm missing something. You can CNAME git.tychi.me to git.sr.ht, but not to git.sr.ht:~tychi

@garritfra @tychi the problem is this is not http traffic. when you do `git clone` you probably want `ssh`. At least for pushing.

@stchris @garritfra ah, that makes sense. Probably also explains why services don't offer this, not an easy problem to solve πŸ˜…

@tychi How about setting up a reverse proxy that forwards all requests to something like Codeberg? I think for public repositories it can work. Never tried it myself though

@tychi Would you consider a cheap VPS and a gogs.io or gitea installation? You could register your custom domain to the VPS (but check if they actually do real backups, and even so mirror your git repos locally just in case).

Sign in to participate in the conversation
Fosstodon

Fosstodon is an English speaking Mastodon instance that is open to anyone who is interested in technology; particularly free & open source software.