Skip to content

Instantly share code, notes, and snippets.

@gregjhogan
Last active January 26, 2016 22:24
Show Gist options
  • Select an option

  • Save gregjhogan/4b9f0147d9f1d6e8238f to your computer and use it in GitHub Desktop.

Select an option

Save gregjhogan/4b9f0147d9f1d6e8238f to your computer and use it in GitHub Desktop.
npm calling git through proxy
Install git
https://git-for-windows.github.io/
Add the following to the system PATH variable (requires jenkins service restart):
C:\Program Files\Git\bin
Set proxy for git globally:
git config --system http.proxy http://proxy.com:8080
git config --system https.proxy http://proxy.com:8080
Set redirect from git:// to https://
git config --system url."https://github.com/".insteadOf git@github.com
git config --system url."https://".insteadOf git://
Set proxy for npm globally:
npm config -g set proxy http://proxy.com:8080
npm config -g set https-proxy http://proxy.com:8080
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment