Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [egit-dev] SSH url

On Mon, Jun 21, 2010 at 2:31 AM, Alex Blewitt <alex.blewitt@xxxxxxxxx> wrote:
> Is there a reason why we use git+ssh as the protocol for remote connections
> when the Git documentation only talks of ssh connections?

Long story.

Originally Git only used rsync for transport, and the argument given
to git was passed down to rsync as-is.  So "user@host:path" was the
typical style for SSH connections, as that is what rsync uses to open
an SSH connection to the remote host.

Then anonymous git:// came along, because rsync wasn't ideal for Git
transport.  This lead rise to having a protocol name as part of the
URL.

Somewhere along the line we learned ssh:// to mean use an SSH
connection.  But I think another system was already using git+ssh://
(Cogito?), and users confused the order, so ssh+git:// was also
accepted... and now its a big pile of synonyms for the same thing.

As far as preference goes, I think Linus Torvalds, Junio Hamano and
myself all prefer "user@host:path" for SSH URIs.  But not all tools do
that.  Gerrit Code Review for instance has to advertise ssh:// URIs
because it needs to embed the non-standard port number into the URI,
and I think ssh:// is cleaner to read than git+ssh.

As for why EGit prefers git+ssh over ssh, I don't know. My memory is
fuzzy, but I think its Robin's preference to use git+ssh to mean an
SSH URI that is speaking Git over it.

-- 
Shawn.


Back to the top