git yarn npm 代理设置http socks5


git

git代理设置方法解决

git config --global http.proxy http://127.0.0.1:1080
git config --global https.proxy https://127.0.0.1:1080

git delete proxy

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

socks5 代理方式

git config --global http.proxy 'socks5://127.0.0.1:1080'
git config --global https.proxy 'socks5://127.0.0.1:1080'
# 如果提示失败
git clone https://github.com/xxxxxx 
git clone https://ghproxy.com/https://github.com/xxxxxx 

也可以在浏览器中打开
https://ghproxy.com/https://github.com/xxxxxx.zip

yarn

yarn config set proxy http://127.0.0.1:1080
yarn config set https-proxy http://127.0.0.1:1080

npm

npm config set proxy=http://127.0.0.1:1080
# 查看源
npm get registry
# 设置源
npm config set registry https://registry.npmmirror.com
# 设置npmjs源 发布npm包时候必须使用npmjs源
npm config set registry https://registry.npmjs.org

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