您的位置:首页 > 编程语言

fatal: unable to access '': Could not resolve host: github.com - git clone失败

2020-01-14 19:11 1071 查看

今天在服务器使用

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 命令就可以了。

  • 点赞
  • 收藏
  • 分享
  • 文章举报
vivi-blog 发布了10 篇原创文章 · 获赞 2 · 访问量 808 私信 关注
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: 
相关文章推荐