【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
相关推荐
Unity粉末状在校生5 小时前
Git解决fatal: Could not read from remote repository.的问题
git
少年攻城狮6 小时前
Obsidian系列---【如何使用obsidian同步到git?】
git
Hommy888 小时前
【开源剪映小助手】Docker 部署
docker·容器·开源·github·aigc
do better myself8 小时前
网站源码如何部署和加入GIT仓库的
git
爱学英语的程序员11 小时前
Git 提交 LF will be replaced by CRLF the next time Git touches it 报错
git
qq_3391911411 小时前
服务器git pull每次都要输入密码,linux 设置git登录,linux设置git只输入一次账户密码
git
CoderJia程序员甲17 小时前
GitHub 热榜项目 - 日榜(2026-04-09)
人工智能·ai·大模型·github·ai教程
魔卡少女117 小时前
Nginx配置代码化自动部署詹金斯/Github方案
前端·nginx·github
李白的天不白17 小时前
ai编程工具
github
一颗小行星!18 小时前
快速理解 Git submodule
git