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

Re: git 2.3.4, ssh: Could not resolve hostname

From
Jeff King <peff@peff.net>
Date
Apr 2, 2015, 19:14 UTC
Message-ID
<20150402191452.GA20420@peff.net>
In-Reply-To
<201C57EF-FC96-4FFB-81D2-90F94428A6CA@rawsound.com>
On Thu, Apr 02, 2015 at 11:58:13AM -0700, Reid Woodbury Jr. wrote:
> The colons were part of the output. The 'xxxx' replaces the domain in
> the response.

OK, if the double colons are correct, then that is almost certainly the problem:

  $ ssh does-not-exist
  ssh: Could not resolve hostname does-not-exist: No address associated with hostname
  $ ssh does-not-exist:
  ssh: Could not resolve hostname does-not-exist:: No address associated with hostname
> The domain is an internal one that my client would rather keep private.
Can you give us a hint as to the format of your remote URL? This "works":
  $ git push does-not-exist:repo.git
  ssh: Could not resolve hostname does-not-exist: No address associated with hostname

in the sense that it looks up the right hostname (which is of course nonsense, but note the single colon in the error message). So does:

  $ git push ssh://does-not-exist/repo.git
  ssh: Could not resolve hostname does-not-exist: No address associated with hostname
but this does not:
  $ git push ssh://does-not-exist:/repo.git
  ssh: Could not resolve hostname does-not-exist:: No address associated with hostname

(note the doubled colon). v2.3.3 did strip off that extra colon, but I am not sure the URL above (i.e., a colon with no hostname) is actually sane. IOW, it may have happened to work in older versions, but I'm not sure we would want to promise to keep it working.

Can you show us what your URL looks like, obfuscating the names but keeping the syntax the same? Also, are you using the "insteadOf" config syntax at all (which could easily lead to funny splicing, I imagine).

> But this got me to think that this might be an
> important detail: I am using GIT from a remote node on a Cisco
> AnyConnect VPN with DNS served by ActiveDirectory.

If the extra colon is indeed the problem, I don't think the DNS setup is relevant. The name git is feeding to ssh is bogus.

-Peff
Previous: Reid Woodbury Jr.Next: Junio C Hamano
Message 4 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.