Git proxy

  • 方法一:单次代理

此方法一般用在没有配置全局代理,偶尔clone一次的情况。

git clone -c http.proxy="10.10.10.120:7890" https://github.com/openwrt/openwrt.git
  • 方法二:git全局代理设置

此方法一般用在编译是需要大量git仓库的情况

# set
git config --global http.proxy http://10.10.10.120:7890
git config --global https.proxy https://10.10.10.120:7890

# unset
git config --global --unset http.proxy
git config --global --unset https.proxy

shell proxy

最后修改:2023 年 08 月 15 日
如果觉得我的文章对你有用,请随意赞赏