【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
相关推荐
恋喵大鲤鱼10 分钟前
git merge
git·git merge
右耳朵猫AI44 分钟前
GitHub周趋势2026W22 | AI编程工具、知识图谱、自托管、AI代理、代码智能
人工智能·github·ai编程
码客日记44 分钟前
Spring Boot 配置文件敏感信息加密(Jasypt 企业级完整方案)
java·spring boot·git
_codemonster1 小时前
Codex 核心进阶玩法(技能/MCP/派生/分叉/Git/钩子/子智能体)
git
逻极1 小时前
Git 从入门到精通:版本控制协作实战指南
git·github·分支管理·版本控制
恋喵大鲤鱼1 小时前
git clean
git·git clean
Patrick_Wilson2 小时前
为省一次回归测试,该不该把多个改动堆进一条分支?
git·ci/cd·架构
用户7459571748402 小时前
hug:写 Python API,几行代码就够了
github
恋喵大鲤鱼2 小时前
git blame
git·git blame
yeflx2 小时前
Git操作
git