Closed pshirshov closed 4 years ago
Thanks for raising this.
From the git-clone
man page:
The following syntaxes may be used with them:
- ssh://[user@]host.xz[:port]/path/to/repo.git/
- git://host.xz[:port]/path/to/repo.git/
- http[s]://host.xz[:port]/path/to/repo.git/
- ftp[s]://host.xz[:port]/path/to/repo.git/
An alternative scp-like syntax may also be used with the ssh protocol:
- [user@]host.xz:path/to/repo.git/
The 'scp-like syntax' is the troublesome one. It uses a :
to separate the host from the path, which seems to be something neither RFC-3986 nor WHATWG supports.
I feel the best option would be to add a new parser and new methods:
AbsoluteUrl.parseScpLike(...)
that accepts only scp-like URLs and has return type AbsoluteUrl
Url.parseMaybeScpLike(...)
which accepts both regular URLs and scp-like URLs and has return type Url
.If it's an option, you can currently workaround the issue by using SSH urls in the format ssh://git@github.com/org/project.git
. I just tried it and it seems to work
Related:
@pshirshov This is now released in version 2.1.0
. See support in the docs. Let me know if you need anything else. Thanks again.
Thanks for a nice library. Unfortunately it cannot handle GIT URIs, could you fix that please?