fatal: unable to access '': Could not resolve host: github.com - git clone失败
今天在服务器使用git clone命令时报错:Cloning into 'GLACNet'...fatal: unable to access 'https://github.com/tkim-snu/GLACNet.git/': Could not resolve host: github.com然后执行命令ping github.com,也失败了:ping: unknown host...
·
今天在服务器使用git clone
命令时报错:
Cloning into 'GLACNet'...
fatal: unable to access 'https://github.com/tkim-snu/GLACNet.git/': Could not resolve host: github.com
然后执行命令ping github.com
,也失败了:
ping: unknown host github.com
解决方案
修改/etc/hosts
文件:
sudo vim /etc/hosts
进入vim编辑该文件,在最后一行加入:
192.30.253.112 github.com
wq
保存退出,再使用 git 命令就可以了。
更多推荐
已为社区贡献1条内容
所有评论(0)