git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: Regarding the depreciation of ssh+git/git+ssh protocols

From
Jakub Narębski <jnareb@gmail.com>
Date
Mar 17, 2021, 00:45 UTC
Message-ID
<85r1kewqui.fsf@gmail.com>
In-Reply-To
<C9YUBUYH7PWU.3PHDZR2YCUEOX@taiga>
"Drew DeVault" <sir@cmpwn.com> writes:
> On Tue Mar 16, 2021 at 7:54 AM EDT, brian m. carlson wrote:
Show 9 quoted lines
>> I believe this construct is nonstandard. It is better to use standard
>> URL syntax when possible because it makes it much, much easier for
>> people to use standard tooling to parse and handle URLs. Such tooling
>> may have special cases for the HTTP syntax that it doesn't use in MAILTO
>> syntax, so it's important to pick something that works automatically.
>
> It is standard - RFC 3986 section 3.1 permits the + character in
> URI schemes. The use of protocol "composition", e.g. git+https, is a
> convention, but not a standard.

All right, that is true... but the Git itself and Git--related tools do not usually employ the full-fledged URI parser, as far as I know. They just check for the few schemas they support if the repository location is given as an URI / URL.

That said, if the RFC states it, then it is a standard construct.
Show 9 quoted lines
>> So I'm very much opposed to adding, expanding, or giving any sort of
>> official blessing to this syntax, especially when there are perfectly
>> valid and equivalent schemes that are already blessed and registered
>> with IANA.
>
> This convention is blessed by the IANA, given that they have
> accepted protocol registrations which use this convention:
>
> https://www.iana.org/assignments/uri-schemes/uri-schemes.xhtml

Well, thara is a total of one protocol (CoAP) that uses '+' based schemas, namely: coap+tcp, coap+ws, coaps+tcp, coaps+ws (well at least out of those protocols that made it into IANA).

Though it in this case neither of those parts of schema joined by the '+' sign is an application name...

Show 14 quoted lines
>> It's difficult enough to handle parsing of SSH specifications and
>> distinguish them uniformly from Windows paths (think of an alias named
>> "c"), so I'd prefer we didn't add additional complexity to handle this
>> case.
>
> There's no additional complexity here: git remotes are URIs, and any
> implementation which parses them as such already deals with this case
> correctly. Any implementation which doesn't may face all kinds of
> problems as a consequence: SSH without a user specified, HTTPS with
> Basic auth in the URI username/password fields (or just the password,
> which is also allowed), and so on. Any sane and correct implementation
> is pulling in a URI parser here, and if not, I don't think it's fair for
> git to constrain itself in order to work around some other project's
> bugs.

The Git documentation explicitly enumerates all possible URL types that you can use with Git.

On the other hand Git-related tools can support more types of URL, for example ones for AWS S3 buckets.

Show 10 quoted lines
>
>> Lest you think that only Git has to handle parsing these
>
> I don't, given that my argument stems from making it easier for
> third-party applications to deal with git URIs :)
>
>> Despite the fact that ssh+git is specified as deprecated, we had
>> people expect it to magically work and had to support it in Git LFS.
>
> Aye, people do expect it to work. The problem is not going to go away.

To reiterate, the idea of "prefixed URLs", that is using git+https:// and git+ssh:// is to denote that said URL is only usable by Git, without any additional out-of-band information (like other attributes on <a> element or its encompassing element)?

Best, -- Jakub Narębski

Previous: Drew DeVaultNext: Drew DeVault
Message 17 of 27 in “Regarding the depreciation of ssh+git/git+ssh protocols”
  1. Drew DeVaultMar 15, 2021
  2. Jonathan NiederMar 15, 2021
  3. Drew DeVaultMar 15, 2021
  4. brian m. carlsonMar 15, 2021
  5. Drew DeVaultMar 16, 2021
  6. Jonathan NiederMar 16, 2021
  7. Drew DeVaultMar 16, 2021
  8. Jeff KingMar 16, 2021
  9. Drew DeVaultMar 17, 2021
  10. Junio C HamanoMar 18, 2021
  11. Drew DeVaultMar 18, 2021
  12. Eli SchwartzMar 16, 2021
  13. brian m. carlsonMar 16, 2021
  14. Drew DeVaultMar 16, 2021
  15. Jeff KingMar 16, 2021
  16. Drew DeVaultMar 17, 2021
  17. Jakub NarębskiMar 17, 2021
  18. Drew DeVaultMar 17, 2021
  19. brian m. carlsonMar 17, 2021
  20. Drew DeVaultMar 18, 2021
  21. Eli SchwartzMar 16, 2021
  22. Jonathan NiederMar 17, 2021
  23. Eli SchwartzMar 31, 2021
  24. Mark LodatoApr 7, 2021
  25. Junio C HamanoApr 7, 2021
  26. Kerry, RichardApr 13, 2021
  27. Drew DeVaultMar 16, 2021

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.