I'm needing to give my http://github.com/user/project
as a git:// URL, and it needs to be read-only and public. My http://github
repo is public at the moment, but I can't figure out to generate or get my git:// URL.
Thank you for reading. :)
I'm needing to give my http://github.com/user/project
as a git:// URL, and it needs to be read-only and public. My http://github
repo is public at the moment, but I can't figure out to generate or get my git:// URL.
Thank you for reading. :)
While simply replacing https//
by git://
should work, the fact is git will use the port 9418 to communicate (I mention it in "Which is faster, ssh or git protocol?").
That port is often blocked (as shown in "git://
protocol blocked by company, how can I get around that?"), which is why only https://
and ssh://
are shown in the GitHub GUI.
Note that this gist illustrates that you could push from git://
, but push over (for instance) ssh://
with the pushInsteadOf
config setting:
You can clone everything over git://, but tell Git to push over HTTPS.
[url "https://github.com/"]
pushInsteadOf = git://github.com/
Likewise, if you want to clone over git:// or HTTPS, but push over SSH:
[url "git@github.com:"]
pushInsteadOf = git://github.com/
pushInsteadOf = https://github.com/