Subject: Re: git 2.3.4, ssh: Could not resolve hostname

From: Jeff King <[email-masked]>
Date: Thu, 2 Apr 2015 15:14:52 -0400

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