1. 程式人生 > >ssh: Could not resolve hostname github.com: Name or service not known; fatal: The remote end hung up

ssh: Could not resolve hostname github.com: Name or service not known; fatal: The remote end hung up

剛才想向github遠端倉庫push我的程式碼,結果報錯:

在stackoverflow上面找到解決方案:

ping github.com, if ping failed. it is DNS error.sudo vim /etc/resolv.conf, the add: nameserver 8.8.8.8 nameserver 8.8.4.4

好,我ping了github.com,再次報錯:

ping github.com
ping: unknown host github.com

繼續搜,【

Linux不能上網ping:unknown host問題怎麼解決?

解決方案:

http://jingyan.baidu.com/article/4d58d54137d2a19dd5e9c050.html

可以上網了。