问题
I was checking the ISO OSI chart where you can see the other two protocols git uses:
https: ( this is http over ssl)
and
ssh
but no mention of git://
Here is ISO OSI:
https://en.wikipedia.org/wiki/OSI_model
回答1:
The git protocol is a special daemon that comes packaged with Git; it listens on a dedicated port (9418) that provides a service similar to the SSH protocol, but with absolutely no authentication.
It was introduced at the very beginning of Git, in commit 2386d65 (July 2005, Git 0.99.1)
Add first cut at "git protocol" connect logic.
Useful for pulling stuff off a dedicated server. Instead of connecting with ssh or just starting a local pipeline, we connect over TCP to the other side and try to see if there's a git server listening.
Of course, since I haven't written the git server yet, that will never happen. But the server really just needs to listen on a port, and execute a "git-upload-pack" when somebody connects.
(It should read one packet-line, which should be of the format
"git-upload-pack directoryname\n"
and eventually we might have other commands the server might accept).
The protocol is initially described in the next commit 9b011b2
There are two Pack push-pull protocols.
upload-pack
(S) | fetch/clone-pack (C) protocol:send-pack
|receive-pack
protocol
Nowadays, the full characteristic of a git daemon server is described in Documentation/git-daemon.txt.
A really simple TCP Git daemon that normally listens on port "
DEFAULT_GIT_PORT
" aka 9418.
It waits for a connection asking for a service, and will serve that service if it is enabled.
Note that even though is isn't listed in OSI model, 9418 is still listed from the very beginning as IANA (Internet Assigned Numbers Authority)
See commit ba8a497 (Setp. 2005, Git 0.99.7a:
[PATCH] Add note about IANA confirmation
The git port (9418) is officially listed by IANA now.
So document it.
回答2:
If i do not understand wrong then you might be asking for GIT Custom protocol URI If yes then GIT URI is x-github-client://openRepo/<RepoLink>
It opens Repo in GIT Desktop Application.
Hope it will help you or someone.
来源:https://stackoverflow.com/questions/33846856/what-exactly-is-the-git-protocol