git@vger.kernel.org mailing list mirror (one of many)
 help / color / mirror / code / Atom feed
* Broken handling of URL with literal IPv6 address
@ 2014-09-18 11:29 Christian Taube
  2014-09-18 13:03 ` Torsten Bögershausen
  0 siblings, 1 reply; 2+ messages in thread
From: Christian Taube @ 2014-09-18 11:29 UTC (permalink / raw
  To: git


Hello,

I was sent here from the IRC channel.


Using git 2.1.0, the command

  git clone ssh://[2001:db8::1]/repo.git

succeeds, but adding a username to the URL like this

  git clone ssh://user@[2001:db8::1]/repo.git

fails with an invalid hostname message:

Cloning into 'repo.git'...
ssh: Could not resolve hostname [2001: Name or service not known
fatal: Could not read from remote repository.


I found this workaround:

  git clone ssh://[user@2001:db8::1]/repo.git

but this seems to be contrary to the definition of URLs in RFC 3986.

http://tools.ietf.org/html/rfc3986


Please have a look at this. Thank you!


--
Christian Taube

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: Broken handling of URL with literal IPv6 address
  2014-09-18 11:29 Broken handling of URL with literal IPv6 address Christian Taube
@ 2014-09-18 13:03 ` Torsten Bögershausen
  0 siblings, 0 replies; 2+ messages in thread
From: Torsten Bögershausen @ 2014-09-18 13:03 UTC (permalink / raw
  To: Christian Taube, git

On 2014-09-18 13.29, Christian Taube wrote:
> 
> Hello,
> 
> I was sent here from the IRC channel.
> 
> 
> Using git 2.1.0, the command
> 
>   git clone ssh://[2001:db8::1]/repo.git
> 
> succeeds, but adding a username to the URL like this
> 
>   git clone ssh://user@[2001:db8::1]/repo.git
> 
> fails with an invalid hostname message:
> 
> Cloning into 'repo.git'...
> ssh: Could not resolve hostname [2001: Name or service not known
> fatal: Could not read from remote repository.
> 
> 
> I found this workaround:
> 
>   git clone ssh://[user@2001:db8::1]/repo.git
> 
> but this seems to be contrary to the definition of URLs in RFC 3986.
> 
> http://tools.ietf.org/html/rfc3986
> 
> 
> Please have a look at this. Thank you!
> 
> 
> --
> Christian Taube

This is indeed a bug.
We handle literal IPv6 adresses OK, we handle ssh://user@host OK.
But it seems as if you are the first one using the combination of both,
thanks for the bug report.

If somebody want to have a look in the Git source tree:
connect.c, t/t5500-fetch-pack.sh and t/t5601-clone.sh may deserve an update.
 

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2014-09-18 13:03 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-09-18 11:29 Broken handling of URL with literal IPv6 address Christian Taube
2014-09-18 13:03 ` Torsten Bögershausen

Code repositories for project(s) associated with this public inbox

	https://80x24.org/mirrors/git.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).