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