Git在无法访问github的访问方法

Git无法下载github上的源代码

代理的情况

问题Failed to connect to github.com port 443 after 21100 ms: Couldn't connect to server

提示我们需要为Git单独配置代理。

  • 查看我们的代理端口
     为git 设置全局代理

git config --global http.proxy 127.0.0.1:<你的端口号>

比如:

git config --global http.proxy 127.0.0.1:7890
备注Clash 代理一般就是7890端口

然后再git clone 就不会出现connect的问题了

非代理情况

如果你并未使用VPN,但依然遇到端口443连接失败的问题,尝试取消Git的代理设置:

git config --global --unset http.proxy

相关推荐
Maggie_ssss_supp6 小时前
Linux-MySQL主从复制
github
css趣多多6 小时前
git的基本使用
git
秋月的私语7 小时前
Windows系统下Git换行符问题的完整解决方案
windows·git
cg50178 小时前
Continue插件实现本地部署一个“cursor”或“github copilot”
github·copilot·curcor
Lam㊣8 小时前
Ubuntu系统安装Elasticsearch
ubuntu·elasticsearch·jenkins
兰舟比特8 小时前
【Git专栏】Git中常用撤回add和commit的指令
git
妙娲种子8 小时前
gittee连接github镜像
gitee·github
无限进步_9 小时前
C语言实现贪吃蛇游戏完整教程【最终版】
c语言·开发语言·c++·git·游戏·github·visual studio
CoderJia程序员甲9 小时前
GitHub 热榜项目 - 日榜(2026-01-21)
ai·开源·大模型·github·ai教程
muddjsv9 小时前
Git 命令全解析:分类、常用命令与实战指南
git