【发布时间】:2013-02-10 02:28:13
【问题描述】:
我已经安装了 RasPi Raspbian,现在我不能做 ssh 或 git clone,似乎只能解析本地主机名。然而 ping 工作:
pi ~ $ ssh test.com
ssh: Could not resolve hostname test.com: Name or service not known
pi ~ $ git clone gitosis@test.com:test.git
Cloning into 'test'...
ssh: Could not resolve hostname test.com: Name or service not known
fatal: The remote end hung up unexpectedly
pi ~ $ ping test.com
PING test.com (174.36.85.72) 56(84) bytes of data.
我通过使用http://github.com 而不是git://github.com 为 github 解决了这个问题,但这不正常,我想找出问题所在。
谷歌搜索类似问题,但提供的解决方案要么是错字更正,要么是向主机文件添加域。
【问题讨论】:
-
如果可以ping通,请尝试使用IP地址。
git clone gitosis@174.36.85.72:test.git。我还要看看nslookup test.com以确保它正确解析。 -
当然我可以使用 IP 地址,但我想一劳永逸地修复它。最重要的是 - 了解导致它的原因。
标签: networking