关于无法 Git github 项目的解决方法

关于无法 Git github 项目的解决方法

​ 今天上线突然发现没办法 git github 仓库的项目了,显示无法连接

​ 网上有一些解决方法说是修改 host 文件,但我觉得这对小白来说并不友好,我觉得最安全也最简单的方式还应该是使用代理服务器,这里可以查看一下你的代理使用的端口号,一般来说是 1080,如果你是用的是 clash 那默认的可能是 7890,这个需要去代理软件上自行查找

sh 复制代码
# 设置ss
git config --global http.proxy socks5://127.0.0.1:1080
 
git config --global https.proxy socks5://127.0.0.1:1080
 
# 设置代理
git config --global https.proxy http://127.0.0.1:1080
 
git config --global https.proxy https://127.0.0.1:1080
 
# 取消代理
git config --global --unset http.proxy
 
git config --global --unset https.proxy
 
# 仅代理GitHub
git config --global http.https://github.com.proxy https://127.0.0.1:1080
 
git config --global https.https://github.com.proxy https://127.0.0.1:1080

​ 打开你的 git bash ,输入设置代理的命令,这样就可以解决啦

中...(img-JqiZmPWW-1733389735798)]

相关推荐
u1301308 小时前
GitHub 热榜项目:日榜(2026-10-29)
人工智能·github
穆梓兰煊9 小时前
Python 千万级向量检索内存优化手册
github
用户837133200769 小时前
AI总是会忘记细节咋办?我用GitHub实现外部记忆管理
人工智能·github
逛逛GitHub10 小时前
这 6 个 GitHub 项目是刚开源,但是 Star 攀升很快的几个。
github
不老刘13 小时前
Antigravity 的 New Worktree 模式:给 AI 代理一个安全的“平行工位”
人工智能·git·ai编程·antigravity
wflynn14 小时前
GitHub 日榜趋势速报 | 2026-10-29
开源·github
光谱SpectrAI14 小时前
Windows 也中招:Git Bash 和 Node 仍信任泄露的 eMudhra 证书
git
伊布拉西莫14 小时前
GitHub Actions 自动化发布指南
github·devops
YIN_尹14 小时前
【git原理与使用】git初识与安装
大数据·git·elasticsearch
是jin奥15 小时前
Claude Code + GitHub 自动化工作流整理
运维·自动化·github