Git
设置代理
git config --global http.proxy socks5://127.0.0.1:10808
git config --global https.proxy socks5://127.0.0.1:10808
查看代理
git config --global --get http.proxy
git config --global --get https.proxy
删除代理
git config --global --unset http.proxy
git config --global --unset https.proxy
设置尽在连接github.com
时有效
git config --global http.https://github.com.proxy socks5://127.0.0.1:10808
git config --global --unset http.https://github.com.proxy
git config --global --get http.https://github.com.proxy
Npm
- 修改源地址
查看当前使用的地址
npm config get registry
使用阿里源
阿里镜像站地址: https://npmmirror.com
npm config set registry https://registry.npmmirror.com/
恢复官方源
npm config set registry https://registry.npmjs.org/
- 设置代理
查看代理
npm config get proxy
npm config get https-proxy
设置代理
npm config set proxy socks5://127.0.0.1:10808
npm config set https-proxy socks5://127.0.0.1:10808
删除代理
npm config delete proxy
npm config delete https-proxy
Yarn
- 修改源地址
查看当前使用的地址
yarn config get registry
使用阿里源
yarn config set registry https://registry.npmmirror.com/
恢复官方源
yarn config set registry https://registry.yarnpkg.com/
- 设置代理
查看代理
yarn config get proxy
yarn config get https-proxy
设置代理
yarn config set proxy socks5://127.0.0.1:10808
yarn config set https-proxy socks5://127.0.0.1:10808
删除代理
yarn config delete proxy
yarn config delete https-proxy
网友评论