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

Re: git 2.3.4, ssh: Could not resolve hostname

From
brian m. carlson <sandals@crustytoothpaste.net>
Date
Apr 3, 2015, 01:30 UTC
Message-ID
<20150403013021.GA10125@vauxhall.crustytoothpaste.net>
In-Reply-To
<551DD887.2010403@web.de>
On Fri, Apr 03, 2015 at 02:02:15AM +0200, Torsten Bögershausen wrote:
Show 10 quoted lines
> But not this one:
>  ./git fetch-pack  --diag-url  ssh://git.kernel.org:/pub/scm/linux/kernel/git/mchehab/v4l-dvb.git
> Diag: url=ssh://git.kernel.org:/pub/scm/linux/kernel/git/mchehab/v4l-dvb.git
> Diag: protocol=ssh
> Diag: userandhost=git.kernel.org:
> Diag: port=NONE
> 
> 
> Spontaneously I would say that a trailing ':' at the end of a hostname in the ssh:// scheme
> can be safely ignored, what do you think ?

I think instead of ignoring it we can just produce an error. The user might have meant to specify a port, but forgotten. I've done similar things before.

I generally prefer being a bit stricter and giving helpful error messages rather than trying to intuit what the user meant. The user is always going to come up with a new way to break the code.

-- 
brian m. carlson / brian with sandals: Houston, Texas, US
+1 832 623 2791 | http://www.crustytoothpaste.net/~bmc | My opinion only
OpenPGP: RSA v4 4096b: 88AC E9B2 9196 305B A994 7552 F1BA 225C 0223 B187
Previous: Torsten BögershausenNext: Junio C Hamano
Message 11 of 16 in “git 2.3.4, ssh: Could not resolve hostname”
  1. Reid Woodbury Jr.Apr 2, 2015
  2. Jeff KingApr 2, 2015
  3. Reid Woodbury Jr.Apr 2, 2015
  4. Jeff KingApr 2, 2015
  5. Junio C HamanoApr 2, 2015
  6. Reid Woodbury Jr.Apr 2, 2015
  7. Jeff KingApr 2, 2015
  8. Reid Woodbury Jr.Apr 2, 2015
  9. Thomas SchneiderApr 2, 2015
  10. Torsten BögershausenApr 3, 2015
  11. brian m. carlsonApr 3, 2015
  12. Junio C HamanoApr 3, 2015
  13. Jeff KingApr 3, 2015
  14. Kyle J. McKayApr 3, 2015
  15. Reid Woodbury Jr.Apr 4, 2015
  16. Torsten BögershausenApr 4, 2015

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.