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

相关推荐
独立开阀者_FwtCoder1 小时前
Cursor 1.0 重磅发来袭(毛骨悚然,开始学习你如何编码)
前端·javascript·github
几道之旅1 小时前
gitcode与github加速计划
github·gitcode
WindrunnerMax4 小时前
从零实现富文本编辑器#5-编辑器选区模型的状态结构表达
前端·架构·github
自来也_5 小时前
Git配置代理
git
寻月隐君5 小时前
探索Web3新速度:Sonic高性能Layer-1上的BlindAuction智能合约实践
后端·web3·github
油泼辣子多加5 小时前
2025年06月07日Github流行趋势
github
Moment6 小时前
给大家推荐一个超好用的 Marsview 低代码平台 🤩🤩🤩
前端·javascript·github
独立开阀者_FwtCoder7 小时前
stagewise:让AI与代码编辑器无缝连接
前端·javascript·github
Morpheon16 小时前
Cursor 1.0 版本 GitHub MCP 全面指南:从安装到工作流增强
ide·github·cursor·mcp
LinXunFeng19 小时前
Flutter - GetX Helper 助你规范应用 tag
flutter·github·visual studio code