【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
相关推荐
___波子 Pro Max.19 小时前
Git Worktree 可视化理解指南
git
AI技术增长20 小时前
第 2 集:环境搭建:安装 Claude Code、GitHub CLI 与项目初始化
人工智能·自动化·github
happymaker062621 小时前
git使用快速入门
git
MuzySuntree21 小时前
Ubuntu 使用 GitHub SSH 克隆时报 Permission denied (publickey) 解决方案
ubuntu·ssh·github
不做超级小白21 小时前
从零到可用:在手机上用 Termux + Git + Obsidian 打造稳定同步环境(踩坑全记录)
git·智能手机
凡客丶21 小时前
Git安装与使用保姆教程【超详细】
git
android_cai_niao21 小时前
给Git项目添加多个远程仓库
git·gitee·github
胡小禾1 天前
多账号下git自动切号
git
zhensherlock1 天前
Protocol Launcher 系列:Working Copy 提交与同步全攻略
javascript·git·typescript·node.js·自动化·github·js
前端若水1 天前
Git 全命令超级详细指南
大数据·git·elasticsearch