方法一 使用代理
首先需要一个梯子、保证能够自由访问谷歌、这里以ssr为例 可以看到高级设置里端口号 为 1086
然后对github进行配置,让github走本地代理
# socks5协议,1086端口修改成自己的本地代理端口 git config --global http.https://github.com.proxy socks5://127.0.0.1:1086 git config --global https.https://github.com.proxy socks5://127.0.0.1:1086
相关命令
# 查看所有配置 git config -l # reset 代理设置 git config --global --unset http.proxy git config --global --unset https.proxy
方法二. 借助码云
登录码云、码云上克隆整个仓库、然后代码从码云克隆