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