github代理设置


本地开启代理之后,terminal中执行git命令并没有使用代理,需要单独设置

git代理设置

# 设置git代理
git config --global http.proxy http://127.0.0.1:10080
git config --global https.proxy https://127.0.0.1:10080

# 取消设置git代理
git config --global --unset http.proxy
git config --global --unset https.proxy

terminal代理设置

alias proxy='export http_proxy=127.0.0.1:1088;export https_proxy=$http_proxy'
alias proxyOff='unset http_proxy;unset https_proxy'

通过执行proxy开启代理和proxyOff关闭代理


文章作者: Alex
版权声明: 本博客所有文章除特別声明外,均采用 CC BY 4.0 许可协议。转载请注明来源 Alex !
  目录