Tag Archives: npm


If you work in a corporate behind a firewall, most likely you would need to configure proxy for any of the dev tools that talk to the internet. The write-up below talks about configuring proxy for:

  • Maven – Build and management tool for any Java-based project
  • Git – Distributed version control system
  • npm – Node Packaged Modules (Package manager for Node.js)
  • Bower – Front-end package manager

In order to work with any of the above tools, you would need to have access to the internet. And if your company/client uses a proxy server, you would need to configure these tools to use that proxy in order to talk to the internet.

  • Maven

Add the following section in your maven settings.xml (typically located at ${user.home}/.m2/settings.xml).


For a detailed description on the different settings, please refer to this link.

  • Git

For using git over HTTP, execute the following command.

git config --global http.proxy http://<proxy_server>:<proxy_server_port>
  • npm

Execute the following command. You might want to put it as part of your .bash_profile (for bash) or the profile file of your favorite shell so that you do not need to set it up whenever you open up a new command shell.

npm config set proxy http://<proxy_server>:<proxy_server_port>
  • Bower

Set the following environment variable:  HTTP_PROXY or HTTPS_PROXY (as per your needs).

export HTTPS_PROXY=http://<proxy_server>

Again, you might would want to put it as part of your .bash_profile (for bash). In case of windows, add a new User environment variable.