- git 出现错误 Could not resolve host:
- git 出现错误 Could not resolve host:
- git 出现错误 Could not resolve host:
- git命令报错Could not resolve host: s
- git push出现could not resolve host
- centos linux下使用yum命令安装docker时报错
- git错误--ssh: Could not resolve ho
- 解决github 请检查是否有访问权限或仓库是否存在问题
- Mac 克隆码云项目到本地无法找到主机
- 2021-01-02git的一次问题解决-sshCould no
今天早上push项目到远程仓库的时候,突然出现这个错误:
Could not resolve host: github.com
经查询,原来是github.com没有被主机解析
可通过以下方法解决
- 打开终端,输入以下命令
ping github.com
结果如下图
![](https://img.haomeiwen.com/i1155365/67f89311c63218d5.png)
- 退出ping命令,编辑文件etc/hosts,执行命令
sudo vi /etc/hosts
i 启动编辑模式,然后添加github的地址
# localhost is used to configure the loopback interface
# when the system is booting. Do not change this entry.
##
127.0.0.1 localhost
255.255.255.255 broadcasthost
192.30.255.112 github.com //github地址
::1 localhost
fe80::1%lo0 localhost
esc
:wq 退出即可
网友评论