【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
相关推荐
dong_junshuai12 小时前
每天一个开源项目#68 Needle:14MB 工具调用小模型装进口袋设备
程序员·开源·github
Python私教12 小时前
AI 并行编码的 Worktree 生命周期:创建、隔离与安全回收
人工智能·git
互联网中的一颗神经元13 小时前
16 — 改写历史 rebase:搬家到新楼层,不是合并
git
向上的车轮16 小时前
GitHub Actions 自动化运维实战:Rust 全栈项目 CI/CD 至华为云
运维·自动化·github
互联网中的一颗神经元17 小时前
19 — 贮藏与清理:stash 是抽屉,gc 是打包箱
git
MicrosoftReactor18 小时前
技术速递|GitHub Copilot App 中的堆叠会话与拉取请求
ai·github·copilot·agent
dong_junshuai19 小时前
每天一个开源项目#67 Orca:4.3万星的并行 AI 编程控制台
程序员·开源·github
用户3301448676319 小时前
20 — 远程进阶:强制推送的保险绳——force-with-lease
git
Cooper2519 小时前
别急着改 Git 历史:rebase、cherry-pick、bisect 与 reflog 的安全操作顺序
git