【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
相关推荐
BerryS3N7 小时前
Code Git 工作树:多分支开发的痛点与工作树的曙光
大数据·git·elasticsearch
lbb 小魔仙10 小时前
Git + Python 项目工作流最佳实践:pre-commit、CI、CHANGELOG 自动化
git·python·ci/cd
dong_junshuai11 小时前
每天一个开源项目#46 World Monitor:6.6万星、56层地图的全球情报中枢
github
Xu_youyaxianshen14 小时前
Git 零基础常用指令手册(Gitee / GitHub 通用 )
git·gitee·github
John_ToDebug15 小时前
Git Stash 完全指南:临时保存工作区的艺术
人工智能·git·agent
阿里嘎多学长15 小时前
2026-07-22 GitHub 热点项目精选
开发语言·程序员·github·代码托管
小蠢驴打代码15 小时前
记忆库能通过测试,不等于回答值得信:Coding Agent Memory 的两层评估设计
github·ai编程
武子康16 小时前
Copilot Code Review 从固定 Reviewer 演进为可编程 Runtime,仓库控制面、Setup 供应链、Runner 资源和 MCP 工具同时被纳入审查决策
人工智能·github·aigc
wangruofeng1 天前
opencodex 解锁 Codex 任意模型,一个本地代理打通 Claude/Kimi/GLM/DeepSeek
llm·github·openai
是宇写的啊1 天前
Git远程操作
git