sudo npm set -g proxy http://user:pass@proxy:port
sudo npm set -g https-proxy http://user:pass@proxy:port
- Set http_proxy and https_proxy environment variable to
http://user:pass@proxy:port
- Do not use https instead of http in https_proxy and https-proxy, it causes problem.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
systemProp.http.proxyHost=proxy | |
systemProp.http.proxyPort=port | |
systemProp.http.proxyUser=user | |
systemProp.http.proxyPassword=pass | |
systemProp.http.nonProxyHosts=*.nonproxyrepos.com|localhost | |
systemProp.https.proxyHost=proxy | |
systemProp.https.proxyPort=port | |
systemProp.https.proxyUser=user | |
systemProp.https.proxyPassword=pass |