Skip to content

Instantly share code, notes, and snippets.

@SayanSeth
Last active July 31, 2018 23:15
Show Gist options
  • Save SayanSeth/6598322b50da347ca573a4ef3a6cc914 to your computer and use it in GitHub Desktop.
Save SayanSeth/6598322b50da347ca573a4ef3a6cc914 to your computer and use it in GitHub Desktop.
Set Proxy in node.js npm Module

npm config set proxy http://10.32.0.1:8080 npm config set https-proxy http://10.32.0.1:8080

git config --global http.proxy [http://(http://proxyuser:proxypwd@proxy.server.com:8080/)

Set Proxy in node.js npm Module

The command to set the proxy are

Set proxy for npm:

npm config set proxy http://10.32.0.1:8080 npm config set https-proxy http://10.32.0.1:8080

Set proxy for git:

git config --global http.proxy http://10.32.0.1:8080 git config --global https.proxy http://10.32.0.1:8080

The command to reset proxy for npm

npm config rm proxy npm config rm https-proxy

reset proxy for git

git config --global --unset http.proxy git config --global --unset https.proxy

get proxy setting for git

git config --global --list npm config get list npm config get proxy npm config get https-proxy

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment