Github clone 加速
# 分辨需要设置的代理
HTTP 形式:
git clone https://github.com/xxx/git.git
1
SSH 形式:
git clone git@github.com:xxx/git.git
1
# HTTP 代理
git config --global http.proxy http://127.0.0.1:8080
1
git config --global https.proxy http://127.0.0.1:8080
1
# socks5 代理(如 Shadowsocks)
git config --global http.proxy socks5://127.0.0.1:1080
1
git config --global https.proxy socks5://127.0.0.1:1080
1
# 取消设置
git config --global --unset http.proxy
1
git config --global --unset https.proxy
1
# 只对 github 进行代理, 对国内的仓库不影响, 可以这样设置
git config --global http.https://github.com.proxy https://127.0.0.1:1080
1
git config --global https.https://github.com.proxy https://127.0.0.1:1080
1
上次更新: 2022/08/30, 23:31:20