I've noticed that when a git (html) project page such as this:
https://github.com/fruux/sabre-dav
is cloned, in this manner:
git clone https://github.com/fruux/sabre-dav .
The actual resulting remote url, as listed with git remote -v
is a url such as this:
origin [email protected]:foo/sabre-dav.git
Presumably because I have push access.
So this made me wonder whether it's possible to redirect any given project url to a git repository. If I for instance own http://myosproject.example.org
, is it possible to allow git clone http://myosproject.example.org
and have it actually redirect somehow to a github project instead.
As long as the bare git (the .git
folder) is in the web servers DocumentRoot
, and you set up a specific post-update
hook, it will work.
See this book chapter for more on this
To map your own domain name to a github URL
, I think you just need to define an A
record (if you know the IP address) or a CNAME
record (if you only know the domain name) in your DNS
It may also be possible to configure a reverse proxy in your web server to pass the request for http://my.domain.com/project
to http://github.com/project
.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With