Which is effecient? SSH:// or Git:// (File compression)
I understand in Git , git protocol is smart because there is a protocol agent on both end of commumnication to compress the file transfer resulting in faster clone by effeciently 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 mere 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 deamon 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. Im my usecase i will be setting the git server in hongkong and using it on sanjose 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 Orelly author book he means git is tunneled over ssh, then how does git protocol work when i dont have git daeomon running on the server.
So using SSh://xyz... does it give both the benefit of ssh and git protocols ?
appreciate your answers in advance.