itgoyo / 500Days-Of-Github

⭐ 瞎JB折腾Mac/Linux/Windows过程中遇到的所有问题和解决方式 ⭐
https://itgoyo.github.io/500Days-Of-Github
138 stars 13 forks source link

分享优质工具 - gh-proxy 代理下载或 git clone Github 仓库 #271

Open itgoyo opened 2 years ago

itgoyo commented 2 years ago

简介 在国内网络环境下使用 GitHub 相关服务体验很差,其域名 github.com 和仓库文件直链域名 raw.githubusercontent.com 被 DNS 污染,除了修改 hosts 解决以外,还可以使用 gh-proxy 来代理访问.

gh-proxy 是一款 github release、archive 以及项目文件的加速项目,支持直接在终端 git clone , 也可以在 web 端代理下载 github 以及 raw.githubusercontent.com 等文件.

网站地址: https://ghproxy.com/[](https://static.ioiox.com/usr/uploads/2020/05/2384555126.jpg) 项目默认使用 jsdelivr 和 cnpmjs 的镜像,但有时还是会被污染,本站代理已关闭镜像,直接以阿里云服务器代理访问,体验更好. 使用说明 Web 端直接粘贴 Github 项目或文件直链点击下载即可. 也支持 wget、curl 等需要直链方式的软件,仅需在直链之前加上 https://ghproxy.com 即可. 脚本中可以设置变量,批量在直链前加入代理变量.

git clone 使用终端登陆服务器也可以使用 git clone 命令来下载仓库. 常规命令: git clone https://github.com/xxx/xxx.git 代理命令: git clone https://ghproxy.com/https://github.com/xxx/xxx.git

不支持SSH 的方式 Clone 仓库