【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
相关推荐
小陶来咯1 分钟前
Git Cherry-Pick
git
淘矿人11 分钟前
Claude助力前端开发
java·数据库·git·python·sql·spring·database
sunarmy1 小时前
在git for windows下安装pacman
git
CoderJia程序员甲1 小时前
GitHub 热榜项目 - 周榜(2026-05-17)
ai·大模型·github·ai教程
哎呦,帅小伙哦1 小时前
Git Describe 与 TRAVIS_TAG学习笔记
笔记·git·学习
谷哥的小弟1 小时前
(最新版)Git&GitHub实操图文详解教程(04)—远程仓库GitHub
git·github·pull·push·版本管理·版本控制
AI自动化工坊1 小时前
OpenHuman爆火GitHub:AI桌面助手技术架构深度解析
人工智能·架构·github·ai agent·openhuman
拉拉拉拉拉拉拉马1 小时前
MCP 是什么?它为什么重要?
人工智能·github
weelinking5 小时前
【2026】08_Claude与版本控制:Git协作技巧
数据库·人工智能·git·python·数据挖掘·交互·cloudera
码力斜杠哥10 小时前
Git的说明及基本使用
git