I'm trying to create Git over P2P. (It's crazy, I know.)
The question is simple: can I create a custom protocol for Git alternative to ssh://, git:// and http://?
Git can use four distinct protocols to transfer data: Local, HTTP, Secure Shell (SSH) and Git.
The native git transport uses TCP port 9418. However, git can also run over ssh (often used for pushing), http, https, and less often others.
Yes, that is definitely possible. Git does support remote helpers for just that. From the git fetch
manpage:
When git doesn’t know how to handle a certain transport protocol, it attempts to use the remote- remote helper, if one exists. To explicitly request a remote helper, the following syntax may be used:
<transport>::<address>
Further information about remote helpers can be found at the appropriate man page. If that capability is not powerful enough for you (a quick scan suggests it should be), you should remember that git is open source ;).
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