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

4 messages from 2010-01-30 to 2010-01-30. Participants: Jari Aalto, Ilari Liusvaara, Petr Baudis, Junio C Hamano.
Thread: https://gitlist.dev/t/22453

## Jari Aalto, 2010-01-30 16:57

Subject: FEATURE REQUEST: Allow SSH style URLS (with extra colon)
Message-ID: <87tyu3cyy3.fsf@jondo.cante.net>
URL: https://gitlist.dev/e/87tyu3cyy3.fsf%40jondo.cante.net

```

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

```

## Ilari Liusvaara, 2010-01-30 17:27

Subject: Re: FEATURE REQUEST: Allow SSH style URLS (with extra colon)
Message-ID: <20100130172730.GA28865@Knoppix>
URL: https://gitlist.dev/e/20100130172730.GA28865%40Knoppix
In-Reply-To: <87tyu3cyy3.fsf@jondo.cante.net>

```
On Sat, Jan 30, 2010 at 06:57:56PM +0200, Jari Aalto wrote:
> 
> 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
> 

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

```

## Petr Baudis, 2010-01-30 22:21

Subject: Re: FEATURE REQUEST: Allow SSH style URLS (with extra colon)
Message-ID: <20100130222157.GI9553@machine.or.cz>
URL: https://gitlist.dev/e/20100130222157.GI9553%40machine.or.cz
In-Reply-To: <87tyu3cyy3.fsf@jondo.cante.net>

```
On Sat, Jan 30, 2010 at 06:57:56PM +0200, Jari Aalto wrote:
> 
> 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

But that's not an URL anymore. If you want to use ssh pathspec, write it
as a pathspec, not an URL. Just foo@example.com:/path works fine. ;-)

				Petr "Pasky" Baudis

```

## Junio C Hamano, 2010-01-30 22:30

Subject: Re: FEATURE REQUEST: Allow SSH style URLS (with extra colon)
Message-ID: <7v4om3jker.fsf@alter.siamese.dyndns.org>
URL: https://gitlist.dev/e/7v4om3jker.fsf%40alter.siamese.dyndns.org
In-Reply-To: <20100130222157.GI9553@machine.or.cz>

```
Petr Baudis <pasky@suse.cz> writes:

> On Sat, Jan 30, 2010 at 06:57:56PM +0200, Jari Aalto wrote:
>> 
>> 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 foo@example.com:/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.

```
