2

How do I permanently add bower proxy to my system so I do not have to edit the .bowerrc file for every project and add

{
 "proxy":"http://<proxy>:<port>",
 "https-proxy":"https://<proxy>:<port>",
}

I have added the proxys to my OS with:

export HTTP_PROXY=http://<proxy_url>:<port>
export HTTPS_PROXY=http://<proxy_url>:<port>

But it seams bower does not get it. Thank you in advance for your response

Cisum Inas
  • 11,552
  • 11
  • 40
  • 55

1 Answers1

1

Put the .bowerrc file in your home folder (it will work on Windows as well).

From http://bower.io/docs/config/:

Placement & Order

The config is obtained by merging multiple configurations by this order of importance:

  • CLI arguments via --config
  • Environment variables
  • Local .bowerrc located in the current working directory
  • All .bowerrc files upwards the directory tree
  • .bowerrc file located in user’s home folder (~)
  • .bowerrc file located in the global folder (/)

Example of CLI arguments:

  • --config.endpoint-parser=
  • --config.storage.cache=

Example of valid environment variables:

  • bower_endpoint_parser is evaluated as endpoint-parser
  • bower_storage__cache is evaluated as storage.cache
Andrea Casaccia
  • 4,802
  • 4
  • 29
  • 54