【git】问题解决---Failed to connect to github.com

场景

最近运行命令git push,git pull或者git clone的时候总会报如下错误

bash 复制代码
fatal: unable to access 'https://github.com/xxxxx/xxxxxx.git/': **Failed to connect to github.com** port 443 after 21052 ms: Couldn't connect to server

原因

一般是网络配置原因造成的, 如果能正常进github网页,考虑代理配置原因。

解决方法

通过以下命令从 Git 配置中移除全局代理设置

bash 复制代码
git config --global --unset https.proxy
git config --global --unset http.proxy
相关推荐
勤劳打代码3 分钟前
步步为营 —— Github Connection refused 分层诊断
github
寻月隐君40 分钟前
深入解析 Rust 的面向对象编程:特性、实现与设计模式
后端·rust·github
养意4 小时前
git提交代码和解决冲突修复bug
git·bug
qianmoQ15 小时前
GitHub 趋势日报 (2025年05月31日)
github
油泼辣子多加16 小时前
2025年06月06日Github流行趋势
github
粥里有勺糖17 小时前
视野修炼-技术周刊第122期 | 发光图片制作
前端·javascript·github
码农黛兮_4617 小时前
Git 常用命令大全
git
qianmoQ17 小时前
GitHub 趋势日报 (2025年06月05日)
github
小馒头君君17 小时前
3 个优质的终端 GitHub 开源工具
github
一弓虽17 小时前
git 学习
git·学习