Which is efficient? SSH:// or Git:// (File compression)
I understand in Git, git protocol is smart because there is a protocol agent on both ends of communication to compress the file transfer resulting in faster clone by efficiently using the network bandwidth.
From an O'Reilly book I found the following statements.
For secure, authenticated connections, the Git native
protocol can be tunneled over an SSH connection using
the following URL templates:
ssh: //[user@]example.com[:port]/path/to/repo.git
ssh: //[user@]example.com/path/to/repo.git
ssh: //[user@]example.com/~user2/path/to/repo.git
ssh: //[user@]example.com/~/path/to/repo.git*
I'm not sure if the author means what he says. He talks of git protocol getting tunneled over SSH.
From my perspective, unless you connect to the git port (agent port), the protocol is not in effect. And SSH is merely an uncompressed file transfer. But as per the author, if we use SSH he says the git protocol is tunneled over it. So is SSH smarter in GIT?
Von C,
Thanks for your answer. "Network protocols (HTTP and Git) are generally read-only" Git can be made rw
when you run the daemon with --enable=receive-pack
.
Following are my concerns.
When they say git protocol is smart, they mean when you execute git clone
, Git server agent compresses the data that is sent back to the client, so the clone should be faster. In my use case I'll be setting the Git server in Hongkong and using it on San Jose and other countries as well, So I want to be efficient over network due to latency concerns.
So my question is when I use git clone ssh://user@server/reposloc
do I get the benefits of git protocol also? As per O'Reilly author book he means git is tunneled over ssh, then how does git protocol work when I don't have git daemon running on the server.
So using SSh://xyz... does it give both the benefit of ssh and git protocols?
Appreciate your answers in advance.
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…