【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
相关推荐
第一程序员6 分钟前
Python元编程:非科班转码者的入门指南
python·github
lpfasd1231 小时前
2026 年第 18 周 GitHub 趋势周报
github
历程里程碑10 小时前
4 Git远程协作:从零开始,玩转仓库关联与代码同步(带实操代码讲解)
大数据·c++·git·elasticsearch·搜索引擎·gitee·github
天若有情67311 小时前
自己开发一款极简 Vanilla 原生前端框架,已开源上架 NPM & GitHub
前端框架·npm·github
fthux12 小时前
用了 GitZip 这么多年,我动手做了一个「Pro」版
人工智能·开源·github
金銀銅鐵13 小时前
[git] 浅解 git reset 命令
git·后端
zhangfeng113313 小时前
部署到服务器上 宝塔系统 使用宝塔在线编辑器 FTP 批量上传 Git 部署 打包上传 codebudyy 编程程序开发
服务器·git·编辑器
学习是种信仰14 小时前
Git工作流
git·深度学习
yuanyuan2o216 小时前
Git merge 的几种不同模式
git·github
视觉小萌新16 小时前
关于Vscode配置企业Git
git