--- { "title": "Working behind a proxy", "language": "en", "description": "Instructions for working behind a proxy", "altLangPrefix": "start", "dateModified": "2014-06-20" } ---
The following steps can be used for those working behind proxies that require authentication. All these methods will store your password in plain text, so use caution when doing this.
USERNAME, PASSWORD, PROXY_ADDRESS, and PROXY_PORT with your network's information:
npm config set proxy http://USERNAME:PASSWORD@PROXY_ADDRESS:PROXY_PORTnpm config set https-proxy http://USERNAME:PASSWORD@PROXY_ADDRESS:PROXY_PORTUSERNAME, PASSWORD, PROXY_ADDRESS, and PROXY_PORT with your network's information:
git config --global --add http.proxy http://USERNAME:PASSWORD@PROXY_ADDRESS:PROXY_PORTgit config --global --add https.proxy http://USERNAME:PASSWORD@PROXY_ADDRESS:PROXY_PORTgit config --global url."https://".insteadOf git://git config --global url."https://github.com/".insteadOf git@github.com: (don't remove the final colon)F:\ and C:\Users\USERNAME).Many plugins will also look for environmental variables of HTTP_PROXY and HTTPS_PROXY when they need to call out to the internet.
http://USERNAME:PASSWORD@PROXY_ADDRESS:PROXY_PORT each session by calling:
set HTTP_PROXY=http://USERNAME:PASSWORD@PROXY_ADDRESS:PROXY_PORTexport HTTPS_PROXY=http://USERNAME:PASSWORD@PROXY_ADDRESS:PROXY_PORTC:\Users\USERNAME). That file is run every time you open a Git Bash session, so the environmental variables will be available from the command line. You may need to create that file with a text editor, since Windows doesn't allow creating files starting with a period in Windows Explorer.