2

When I try to clone a github repo, I get the error above.

$ ssh -vvv git@github.com
OpenSSH_7.2p2 Ubuntu-4ubuntu2.1, OpenSSL 1.0.2g  1 Mar 2016
[snip]
debug2: resolve_addr: could not resolve name github.com as address: Name or service not known
ssh: Could not resolve host "github.com"

Using HTTPS instead works fine. Accessing github via any non-SSH method works fine:

$ ping github.com
PING github.com (192.30.253.113) 56(84) bytes of data.
64 bytes from 192.30.253.113: icmp_seq=1 ttl=44 time=109 ms

SSH to a number of other domains works fine.

After some googling I found out about getent which gives me

$ getent hosts github.com
fe80::4cdd:72ff:fe74:ae1 github.com.myhotspot.lan

so I guess the router is hijacking things somehow but my linux fu is not strong enough to figure out how to test or fix that.

1
  • A (crappy) workaround is to add something like [url "git@192.30.255.112"]<newline>insteadOf = git@github.com to ~/.gitconfig. – Tgr Sep 26 '17 at 16:32

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.