解决Github:fatal:unable to access ‘https://github.com/.../.git‘:Could not resolve host:github.com

编程入门 行业动态 更新时间:2024-10-25 20:18:10

1.问题:在Github上clone资源时发生:fatal: unable to access ‘https://github/…/.git’: Could not resolve host: github 错误;提示无法解析主机github;

2.原因:出现该错误是因为使用了proxy代理,所以要解决该问题,核心操作就是要取消代理;

3.查询:通过git配置文件查看是否使用代理:git config --global http.proxy

通过查询系统环境有没有使用代理:env|grep -I proxy

4.解决:通过git取消代理:

  • git config --global --unset http.proxy
  • git config --global --unset https.proxy

通过系统命令取消代理:(可以根据自己查询的代理信息对应进行取消)

  • unset http_proxy
  • unset ftp_proxy
  • unset all_proxy
  • unset https_proxy
  • unset no_proxy

更多推荐

解决Github:fatal:unable to access ‘https://github.com/.../.git‘:Could not resolve

本文发布于:2023-06-13 09:40:00,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/679089.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:unable   access   Github   fatal   https

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!