【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
相关推荐
散峰而望30 分钟前
C++ 启程:从历史到实战,揭开命名空间的神秘面纱
c语言·开发语言·数据结构·c++·算法·github·visual studio
ON10N3 小时前
100% 纯 Vibe Coding,我是怎么用 AI 撸出一个 VS Code 插件的
git·ai编程·visual studio code
Wcowin3 小时前
为Zensical添加 GitHub 热力图卡片
github·zensical
Wcowin6 小时前
为Zensical添加 GitHub 仓库卡片
javascript·github·zensical
Lunar*10 小时前
告别臃肿!使用 git-filter-repo 优雅清理 Git 历史记录
git
tq108610 小时前
agent 记忆 = markdown + json + git
人工智能·git
whynerve10 小时前
使用Pixi构建Python环境
github
uyeonashi11 小时前
自动化测试问卷考试系统测试报告
功能测试·selenium·github
用户5798547697111 小时前
06:WebSocket 实时通信:流式响应与工具调用通知
github
失迭11 小时前
Cloudflare Tunnel + Zero Trust 稳定接入 Netcup VPS SSH
前端·javascript·github