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

相关推荐
京东零售技术3 小时前
京东正式开源基于国产芯片自研的xLLM大模型推理引擎
github
寻月隐君4 小时前
Rust 泛型编程基石:AsRef 和 AsMut 的核心作用与实战应用
后端·github
ayyyy____4 小时前
把项目通过pycharm上传到github(两种方式)
ide·pycharm·github
专注VB编程开发20年4 小时前
vb.net编写DDE(Dynamic Data Exchange)服务器
运维·服务器·github·vb.net·dde
qq_377572775 小时前
github repository 一个文件忘记添加到 .gitignore
github
方圆想当图灵5 小时前
深入浅出 gRPC
java·后端·github
chaofan9805 小时前
如何用 Claude Code 搭建安全、可测、可自动化的 GitHub CI 流程?
运维·人工智能·ci/cd·ai·自动化·github·claude
ITsheng_ge6 小时前
GitHub Pages 部署静态网站流程、常见问题以及解决方案
前端·github·持续部署
小Lu的开源日常7 小时前
如何使用 GitHub Action 发布 Docker 镜像
docker·开源·github
SStone_TJ10 小时前
【常用的git命令】
git