【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
相关推荐
犹若故人归1 小时前
Github/Gitee和Git实践
git·gitee·github
007php0073 小时前
mySQL里有2000w数据,Redis中只存20w的数据,如何保证Redis中的数据都是热点数据
数据库·redis·git·mysql·面试·职场和发展·php
fakerth4 小时前
Git 完全指南:从入门到精通
git
XiaoHu02074 小时前
Linux网络编程套接字
linux·服务器·网络·git
AlexDeng5 小时前
Git 实战:我用 git worktree 一次性拉取多个工作目录
git
import_random5 小时前
[git版本控制]git pull origin main
git
ShallowLin5 小时前
Git 的分支管理
git
无限进步_7 小时前
【C语言&数据结构】二叉树遍历:从前序构建到中序输出
c语言·开发语言·数据结构·c++·算法·github·visual studio
chen_2279 小时前
搭建git工作流
git
好想来前端10 小时前
私有化部署 LLM 时,别再用 Nginx 硬扛流式请求了 —— 推荐一个专为 vLLM/TGI 设计的高性能网关
后端·架构·github