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

相关推荐
whysqwhw3 小时前
Kotlin泛型位置规律与设计考量
github
winner88815 小时前
Git 中 behind 和 ahead of 含义详解:分支同步状态一眼看透
git·behind·ahead of
lpfasd1235 小时前
git-进阶技巧与最佳实践
大数据·git·elasticsearch
whysqwhw5 小时前
KuiklyUI的ViewRef设计
github
snakecy7 小时前
常用命令记录
linux·运维·github
洛卡卡了8 小时前
Typora + PicGo + 阿里云 OSS:一套自己的图床方案
github·设计
逛逛GitHub8 小时前
本周 6 个最火火火火 GitHub 项目,AI 杀疯了。
github
Lisonseekpan8 小时前
Git 命令大全:从基础到高级操作
java·git·后端·github·团队开发
kobe_OKOK_9 小时前
Git Tag 用法记录
git
假女吖☌11 小时前
Git_Rebase
git