14

I'm trying to setup GitHub on my system and I have done all the installation and key setup process:

But during test everything phase getting the following error by command:

$ ssh -T git@github.com
ssh:github.com:no address associated with name
VonC
  • 1,262,500
  • 529
  • 4,410
  • 5,250
user958248
  • 141
  • 1
  • 1
  • 3

6 Answers6

13

I had the same error message. In my case my netbook's wifi switch got bumped and I didn't notice I had no internet connection. So make sure you have internet access if you're getting this error! (duh!)

leoj
  • 1,307
  • 10
  • 20
8

It means it doesn't found your HOME/.ssh/id_rsa and id_rsa.pub, and is looking for a HOME/.ssh/config file which could have defined the name 'github.com', as illustrated here.

That usually means you don't have defined what HOME is (which isn't defined by default on Windows, see this answer)

Community
  • 1
  • 1
VonC
  • 1,262,500
  • 529
  • 4,410
  • 5,250
  • 1
    How come existence of ssh keys is related to not finding remote host? – Piotr Dobrogost Nov 16 '11 at 20:02
  • @PiotrDobrogost Because the config file is located in the same directory than the ssh keys. And the error message suggests the IP address isn't return by the DNS (http://lists.freebsd.org/pipermail/freebsd-questions/2006-December/136983.html). A workaround is to define github.com in an ssh config file, by mentioning its IP address: http://stackoverflow.com/questions/5357232/nbgit-to-remote-host-with-ssh/5357423#5357423 – VonC Nov 16 '11 at 21:07
  • Why do you think it's not returned by the DNS? In the post from freebsd list you gave one reads *You get the second message when there is a primary domain name server for the given domain, but it does not return any IP address for your (named) address.* In my case `ssh git@github.com` works but `git clone ssh://git@github.com:piotr-dobrogost/requests.git` raises `ssh: github.com:piotr-dobrogost: no address associated with name` error. Why does ssh client treat semicolon with what follows as a part of host name? I think that's the cause of the problem... – Piotr Dobrogost Nov 16 '11 at 21:25
  • @PiotrDobrogost: I agree with your diagnostic. This must be linked somehow to the syntax of the uri scheme you are using to clone. Would `git clone ssh://git@github.com/piotr-dobrogost/requests.git` works better? Or `git clone ssh://git@github.com/home/piotr-dobrogost/requests.git`? – VonC Nov 16 '11 at 21:54
  • Please see my question [“no address associated with name” error when cloning github.com's repo under Windows using ssh](http://stackoverflow.com/questions/8159522/) – Piotr Dobrogost Nov 16 '11 at 22:29
5

I tried almost everything found on Google related to this question, and nothing seemed to work. I remembered that Windows has made some updates on 'Windows Defender'. I may seem irrelevant but it is not;

What worked for me was running Git as Administrator, which i never did before.

musicvicious
  • 1,043
  • 16
  • 21
2

I also faced the same problem and the error was that: I was using the wrong URI, it should be like:

ssh -T git@bitbucket.org

and not as what was copied for cloning

ssh -T git@bitbucket.org:username/repo.git

1

If you are working behind proxy, try config ssh to work with the proxy, I encountered the same problem at first and used corkscrew to solve it: http://www.mtu.net/~engstrom/ssh-proxy.php

Jiang
  • 11
  • 1
0

I have a client who developed this problem after a Windows 10 update. After a great amount of web searches and trouble shooting, I noticed that his Windows User ID contained spaces, and the error message had said, "S no address associated with name". I noticed that after the space in his name was his middle initial, "S". So I postulated that the user ID was being passed without quotes and was terminating at the first space.

To test my theory, I created a new user ID with no spaces and ran NX Client 3.5.0-7 and it worked.

This also corrected a problem that sprung up with X2Go.

The short answer is, you must not have any spaces in your user name or both NX Client and X2Go will fail.

alexxmed
  • 81
  • 1