git yarn npm 代理设置http socks5


git代理设置方法解决

npm 访问github失败 可以使用下列方法设置代理

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 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


免责声明!

本站转载的文章为个人学习借鉴使用,本站对版权不负任何法律责任。如果侵犯了您的隐私权益,请联系本站邮箱yoyou2525@163.com删除。



 
粤ICP备18138465号  © 2018-2025 CODEPRJ.COM