Loading... ## git配置代理 http/https代理 - 设置 ```bash git config --global http.proxy http://127.0.0.1:7890 git config --global https.proxy https://127.0.0.1:7890 ``` - 查看 ```bash git config --global http.proxy git config --global https.proxy ``` - 删除 ```bash git config --global --unset http.proxy git config --global --unset https.proxy ``` socks5代理 - 设置 ```bash git config --global http.proxy # socks5://127.0.0.1:7890 git config --global https.proxy # socks5://127.0.0.1:7890 ``` 查看与删除与http/https代理相同 ## npm配置代理 - 设置 ```bash npm config set proxy http://127.0.0.1:7890 npm config set https-proxy http://127.0.0.1:7890 ``` - 删除 ```bash npm config delete proxy npm config delete https-proxy ``` - 查看 ```bash npm config list ``` ## yarn配置代理 - 设置 ```bash yarn config set proxy http://127.0.0.1:7890 yarn config set https-proxy http://127.0.0.1:7890 ``` - 删除 ```bash yarn config delete proxy yarn config delete https-proxy ``` - 查看 ```bash yarn config list ``` ## npm切换源 ```bash npm config set registry http://registry.npm.taobao.org/ (淘宝源) npm config set registry https://registry.npmjs.org/ (官方源) ``` ## yarn切换源 ```bash yarn config set registry http://registry.npm.taobao.org/ (淘宝源) yarn config set registry https://registry.npmjs.org/ (官方源) ``` 最后修改:2022 年 08 月 10 日 © 允许规范转载 打赏 赞赏作者 支付宝微信 赞 0 如果觉得我的文章对你有用,请随意赞赏