【git】Git提交或者报错fatal:unable to access ‘https://github.com/xxx‘: Failed to connect to github.com

编程入门 行业动态 更新时间:2024-10-10 00:21:53

【git】Git提交或者<a href=https://www.elefans.com/category/jswz/34/1771188.html style=报错fatal:unable to access ‘https://github.com/xxx‘: Failed to connect to github.com"/>

【git】Git提交或者报错fatal:unable to access ‘https://github.com/xxx‘: Failed to connect to github.com

1. 问题原因

报错信息:

fatal: unable to access '.git/': 
Failed to connect to github port 443 after 21114 ms: Couldn't connect to server

原因:
在git push时或者clone时,中间会有git的http和https代理,但是我们本地环境本身就有SSL协议了,所以取消git的https或者http代理即可

2. 解决方案

最好的解决方法还是配置ssh方法访问
链接:Github配置SSH访问
避免使用https访问经常网络连接失败或者需要输入密码的问题

  1. 取消git本身的https代理或者http代理
//取消https代理
git config --global --unset https.proxy
//取消http代理
git config --global --unset http.proxy
  1. 上述方案要还是无法解决,运行以下命令:
git config --global http.sslVerify "false"
  1. 科学上网提高连接速度

更多推荐

【git】Git提交或者报错fatal:unable to access ‘https://github.com/xxx‘: Failed to connect

本文发布于:2024-02-14 12:47:55,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1762992.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:报错   fatal   unable   Git   git

发布评论

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

>www.elefans.com

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