关于无法 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)]

相关推荐
一点一木16 小时前
🚀 2026 年 4 月 GitHub 十大热门项目排行榜 🔥
人工智能·github
Qres82118 小时前
Git安装记录
git
宝桥南山19 小时前
AI - 在命令行中尝试一下ACP(Agent Client Protocol)通信
microsoft·微软·github·aigc·copilot
wj30558537819 小时前
Codex + Git 开发环境配置指南(WSL版)
linux·运维·git
拾贰_C21 小时前
【Github | GitHub Copilot | 学生认证】 GitHub Copilot学生如何认证
github
楠枬21 小时前
Git 分支管理
git
旅之灵夫1 天前
【GitHub项目推荐--OpenArm:开源7自由度仿人机械臂平台】
github
一乐小哥1 天前
坚持迭代一个 Chrome 插件半年后,我的同事问我:"这不是 Chrome 自带的功能吗?"
chrome·github·ai编程
Smilezyl1 天前
一个独立开发者,靠一份 markdown 驱动 Claude Code, 用 20 天跑通 9 个包的 monorepo 工程
前端·人工智能·github
峰向AI1 天前
做小红书、画信息图、动漫图:这个skill太实用了
github