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

相关推荐
子兮曰5 小时前
OpenClaw架构揭秘:178k stars的个人AI助手如何用Gateway模式统一控制12+通讯频道
前端·javascript·github
旅之灵夫6 小时前
【GitHub项目推荐--Remotion:使用React编程化创建视频】⭐⭐⭐
github
jiayong238 小时前
Git 核心概念:Tag 与 Branch 的本质区别
git
Serene_Dream11 小时前
git 合并冲突的分支
git
我是一只puppy11 小时前
使用AI进行代码审查
javascript·人工智能·git·安全·源代码管理
玄同76512 小时前
Git常用命令指南
大数据·git·elasticsearch·gitee·github·团队开发·远程工作
吠品13 小时前
命令行揭示SSL证书真相
https·github·ssl
、BeYourself14 小时前
解决git@github.com: Permission denied (publickey)
github
十步杀一人_千里不留行15 小时前
Git提交前ESLint校验实践(Husky + lint-staged)
git·github
朱昆鹏16 小时前
开源 Claude Code + Codex + 面板 的未来vibecoding平台
前端·后端·github