Working behind a proxy
Looking for WET v3.1?
WET v4.0 is now the current version. There is a new location for the Getting started page in WET v3.1.
Setting the proxy for NPM installs
- Open a command prompt
- Run the following commands replacing "USERNAME", "PASSWORD", "PROXY_ADDRESS", and "PROXY_PORT" with your netork's information:
npm config set proxy http://USERNAME:PASSWORD@PROXY_ADDRESS:PROXY_PORT
npm config set https-proxy http://USERNAME:PASSWORD@PROXY_ADDRESS:PROXY_PORT
Setting the proxy for other tasks
Many plugins will also look for environmental variables of "HTTP_PROXY" and "HTTPS_PROXY" when they need to call out to the internet.- You can set these variables with the value "http://USERNAME:PASSWORD@PROXY_ADDRESS:PROXY_PORT" each session by calling:
- Windows Command Prompt:
set http://HTTP_PROXY=USERNAME:PASSWORD@PROXY_ADDRESS:PROXY_PORT
- Bash Shell: "export http://HTTP_PROXY=USERNAME:PASSWORD@PROXY_ADDRESS:PROXY_PORT"
- Windows Command Prompt:
- To avoid doing this everytime, you can add these commands the the your console's "RC" file. If you are using the Git Bash Shell on Windows, you can add the export statements to the ".bashrc" in the root of your user profile ("C:\Users\USERNAME"). That file is run everytime 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.
- Date modified: