git错误--ssh: Could not resolve ho

2018-07-29  本文已影响0人  lxy_悦

git错误--ssh: Could not resolve hostname ssh.github.com: Name or service not known

解决方法:

  1. ping [远程仓库的host name]
ping git.coding.net

得到:123.59.83.81
  1. 写入 hosts
sudo vim /etc/hosts

在文件最后加上:
123.59.83.81  git.coding.net

在进行git操作,成功。

参考文章:
git错误--ssh: Could not resolve hostname ssh.github.com: Name or service not known--解决方式

上一篇下一篇

猜你喜欢

热点阅读