0

What I'm trying to do is setup a custom domain name so that it can be cloned as a git repository using git clone.
For example,

$ git clone https://my-domain-name.tld/ # would be cloned into my-domain-name.tld
# and
$ git clone https://my-domain-name.tld/my-repository # would be cloned into my-repository

I don't actually want to host the repository itself on my server, I just want to configure the DNS (hopefully that's all that's required) so that it will point any requests git clone makes to GitHub, where the repositories in question are actually hosted.

I'm not sure if git clone https://my-domain-name.tld/ without anything after that (so no path in the URL) would work, but since git clone https://github.com/<user>/<repo> works I figured it must at least be possible for git clone https://not-github.com/<repo> to work.

1
  • not sure it possible via dns only, theoretically you can achieve that via reverse proxy , but you still need some VPS as middleware. You can configure nginx or any other reverse proxy there.
    – Sergey92zp
    Jun 2 at 17:45

0

You must log in to answer this question.

Browse other questions tagged .