使用git clone时,出现 fatal: unable to access ‘https://...的解决办法
·
一、问题
使用git clone时,出现 fatal: unable to access ‘https://…
二、解决办法
1、首先ping了一下github.com的网站发现不通
ping github.com
出现ping request could not find host (name). please check name and try again,但是ping其他网站没有问题,说明网络时没有问题的。可能是DNS的映射出现问题。
2、解决办法为:添加映射地址,映射的文件地址为:C:/windows/system32/drivers/etc,

找到文件,复制一份到桌面作为备份。然后用域名查询工具IP查询查询github.com网站的域名,得到ip地址。


然后找到映射文件用vscode打开(用VScode打开,用记事本打开不好使,亲身经历)

将IP地址和域名添加到最后一行。

再此ping github.com网站完美解决问题。git clone命令也正常运行了。特此记录。
更多推荐
所有评论(0)