一些工具设置proxy的办法

2021-06-25  本文已影响0人  CodingCode

列出一些常用工具设置proxy的办法

  1. git

在用户的根目录下面:~/.gitconfig

[http]
proxy = http://<username>:<password>@<address>:<port>
[https]
proxy = https://<username>:<password>@<address>:<port>

或者,针对某一个特定工程项目的根目录下面:.git/config

[http]
proxy = http://<username>:<password>@<address>:<port>
[https]
proxy = https://<username>:<password>@<address>:<port>

或者,通过命令行来设置:

$ git config --global http.proxy http://<username>:<password>@<address>:<port>
$ git config --global https.proxy https://<username>:<password>@<address>:<port>
  1. npm
npm config set proxy http://USERNAME:PASSWORD@PROXY_ADDRESS:PROXY_PORT
npm config set https-proxy http://USERNAME:PASSWORD@PROXY_ADDRESS:PROXY_PORT
上一篇 下一篇

猜你喜欢

热点阅读