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

Re: SSH port ignored when ssh:// prefix isn't specified

From
Matthieu Moy <matthieu.moy@univ-lyon1.fr>
Date
Dec 10, 2017, 20:31 UTC
Message-ID
<q7h9y3mamik4.fsf@orange.lip.ens-lyon.fr>
In-Reply-To
<0101016042190a3b-091dfab3-e010-4fbe-94e7-739ae3090883-000000@us-west-2.amazonses.com>
"mqudsi@neosmart.net" <mqudsi@neosmart.net> writes:
> Basically, while `git clone ssh://git@example.com:2222/path` works, the same
> with the `ssh://` prefix doesn't, and attempts to establish a connection to
> port 22 instead: `git clone git@example.com:2222/path` (I'm not sure what it
> will do with the `:2222` should the connection actually succeed).

I don't see a simple way to distinguish between "I want to connect to port 22 and access directory 2222/path" and "I want to connect to port 2222 and access directory path". So Git chose for you the first option (if you replace 2222 with abcd, it clearly makes sense).

-- 
Matthieu Moy
https://matthieu-moy.fr/
Previous: mqudsi@neosmart.netNext: Randall S. Becker
Message 2 of 3 in “SSH port ignored when ssh:// prefix isn't specified”
  1. mqudsi@neosmart.netDec 10, 2017
  2. Matthieu MoyDec 10, 2017
  3. Randall S. BeckerDec 10, 2017

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.