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

相关推荐
L2ncE36 分钟前
【LanTech】DeepWiki 101 —— 以后不用自己写README了
人工智能·程序员·github
柚个朵朵1 小时前
IDEA中使用Git
java·git·spring
我是哈哈hh1 小时前
【Git】初始Git及入门命令行
git·gitee·github·版本控制器
lifejump1 小时前
Git命令(Gitee)
git·gitee
极小狐2 小时前
如何创建并使用极狐GitLab 部署令牌?
运维·git·ssh·gitlab·github
Kusunoki_D2 小时前
Win11 配置 Git 绑定 Github 账号的方法与问题汇总
git·github
小华同学ai3 小时前
牛!达摩院孵化开源项目,让数字人"活"起来:OpenAvatarChat教你轻松搭建自己的数字人
github
Justice link4 小时前
Git和Gitlab的部署和操作
git
极小狐4 小时前
极狐GitLab 的合并请求部件能干什么?
运维·git·安全·gitlab·极狐gitlab
vortex54 小时前
Git常用命令简明教程
git