Skip to content

Instantly share code, notes, and snippets.

@tigerneil
Forked from beradrian/setproxy
Created August 12, 2018 05:23
Show Gist options
  • Save tigerneil/8996e3b0c70d6165cf834dc2fbca3b0d to your computer and use it in GitHub Desktop.
Save tigerneil/8996e3b0c70d6165cf834dc2fbca3b0d to your computer and use it in GitHub Desktop.
Set proxy for npm and git
# set a proxy
set HTTP_PROXY=
set HTTPS_PROXY=%HTTP_PROXY%
npm config set proxy %HTTP_PROXY%
npm config set https.proxy %HTTPS_PROXY%
npm config set https-proxy %HTTPS_PROXY%
git config --global http.proxy %HTTP_PROXY%
git config --global https.proxy %HTTPS_PROXY%
# unset proxy
npm config delete proxy
npm config delete https.proxy
npm config delete https-proxy
git config --global --unset http.proxy
git config --global --unset https.proxy
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment