Skip to contentSkip to conversation

FEATURE REQUEST: Allow SSH style URLS (with extra colon)

DISCUSSION Jari Aalto 4 participants 4 messages Jun 15, 2016

lore
Share & tools
lore

Jari Aalto

author
#0 lore raw

According to git-clone[1] the SSH protocol is specied as:

    ssh://[user@]host.xz[:port]/path

It woudl be nice if the ":" were allowed, so that the familiar SSH style patch notation could be used, making the spec:

    ssh://[user@]host.xz[:[port]]/path

An example:

    ssh://foo@examplecom:/path
                        |
                        Allowed

Jari

[1] http://www.kernel.org/pub/software/scm/git/docs/git-clone.html

#1 lore raw
Quoted 8 lines · Jari Aalto

According to git-clone[1] the SSH protocol is specied as:

    ssh://[user@]host.xz[:port]/path

It woudl be nice if the ":" were allowed, so that the familiar SSH style patch notation could be used, making the spec:

Quoted 8 lines
    ssh://[user@]host.xz[:[port]]/path

An example:

    ssh://foo@examplecom:/path
                        |
                        Allowed

I would use:

ssh://[user@]host.xz[:port][:]/path

Since empty port isn't allowed, this grammar is uniquely parseable, and would allow specifying port too (if you don't need to specify it, you could just use the scp syntax)[1].

[1] Of course 'ssh://[user@]host.xz[:port]/~/path' works too..

-Ilari

#2 lore raw
In reply to Jari Aalto
Quoted 8 lines · Jari Aalto

According to git-clone[1] the SSH protocol is specied as:

    ssh://[user@]host.xz[:port]/path

It woudl be nice if the ":" were allowed, so that the familiar SSH style patch notation could be used, making the spec:

Quoted 7 lines
    ssh://[user@]host.xz[:[port]]/path

An example:

    ssh://foo@examplecom:/path
                        |
                        Allowed

But that's not an URL anymore. If you want to use ssh pathspec, write it as a pathspec, not an URL. Just [email protected]:/path works fine. ;-)

Petr "Pasky" Baudis

#3 lore raw
Quoted 10 lines · Petr Baudis
Quoted 6 lines · Jari Aalto

An example:

    ssh://foo@examplecom:/path
                        |
                        Allowed

But that's not an URL anymore. If you want to use ssh pathspec, write it as a pathspec, not an URL. Just [email protected]:/path works fine. ;-)

The way URLs are defined is:

<scheme>:<scheme-specific-part>

so if somebody defines his "ssh" scheme to allow any random garbage, its their URL and you cannot say "that is not an URL", unless you qualify your statement with "I want to keep ssh scheme consistent with the common internet scheme syntax".

As I think "ssh://..." is simply moronic, I don't even care to "keep" the scheme specific part consistent with the common internet scheme syntax to begin with. I agree with your conclusion, though ;-)

scp syntax works just fine.