git GITHUB 设置 - 没有与名称关联的地址
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/7509462/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
GITHUB setup - no address associated with name
提问by user958248
I'm trying to setup GitHub on my system and I have done all the installation and key setup process:
我正在尝试在我的系统上设置 GitHub,并且我已经完成了所有安装和密钥设置过程:
But during test everything phase getting the following error by command:
但是在测试一切阶段通过命令得到以下错误:
$ ssh -T [email protected]
ssh:github.com:no address associated with name
回答by leoj
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!)
我有同样的错误信息。在我的情况下,我的上网本的 wifi 开关被碰撞了,我没有注意到我没有互联网连接。因此,如果您收到此错误,请确保您可以访问互联网!(呸!)
回答by VonC
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.
这意味着它没有找到您的HOME/.ssh/id_rsa
and id_rsa.pub
,并且正在寻找一个HOME/.ssh/config
可以定义名称“ github.com
”的文件,如下所示。
That usually means you don't have defined what HOME
is (which isn't defined by default on Windows, see this answer)
这通常意味着您没有定义什么HOME
是(默认情况下在 Windows 上未定义,请参阅此答案)
回答by musicvicious
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;
我尝试了几乎所有在 Google 上找到的与此问题相关的内容,但似乎没有任何效果。我记得 Windows 对“Windows Defender”进行了一些更新。我可能看起来无关紧要,但事实并非如此;
What worked for me was running Git as Administrator
, which i never did before.
对我有用的是running Git as Administrator
,这是我以前从未做过的。
回答by Keshav Gupta
I also faced the same problem and the error was that: I was using the wrong URI, it should be like:
我也遇到了同样的问题,错误是:我使用了错误的 URI,它应该是这样的:
ssh -T [email protected]
ssh -T [email protected]
and not as what was copied for cloning
而不是为了克隆而复制的内容
ssh -T [email protected]:username/repo.git
ssh -T [email protected]:用户名/ repo.git
回答by Jiang
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
如果你在代理后面工作,尝试配置 ssh 与代理一起工作,我一开始遇到了同样的问题,用开瓶器解决了它:http: //www.mtu.net/~engstrom/ssh-proxy.php
回答by alexxmed
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.
我有一个客户在 Windows 10 更新后出现了这个问题。经过大量的网络搜索和故障排除后,我注意到他的 Windows 用户 ID 包含空格,并且错误消息显示“S 没有与姓名相关的地址”。我注意到他名字中的空格后面是他的中间名首字母“S”。所以我假设用户 ID 是在没有引号的情况下传递的,并且在第一个空格处终止。
To test my theory, I created a new user ID with no spaces and ran NX Client 3.5.0-7 and it worked.
为了测试我的理论,我创建了一个没有空格的新用户 ID 并运行 NX Client 3.5.0-7 并且它工作正常。
This also corrected a problem that sprung up with X2Go.
这也纠正了 X2Go 出现的一个问题。
The short answer is, you must not have any spaces in your user name or both NX Client and X2Go will fail.
简短的回答是,您的用户名中不能有任何空格,否则 NX Client 和 X2Go 都会失败。