bower proxy configuration

ProxyBower

Proxy Problem Overview


is there a way to configure bower not only to use a proxy but ignore the proxy configuration for some domains?

I have the problem, that I will run an internal bower registry for our own developed components. For that repository I would like to ignore the proxy configuration.

Proxy Solutions


Solution 1 - Proxy

Edit your .bowerrc file ( should be next to your bower.json file ) and add the wanted proxy configuration

"proxy":"http://<host>:<port>",
"https-proxy":"http://<host>:<port>"

Solution 2 - Proxy

For info, in your .bowerrc file you can add a no-proxy attribute. I don't know since when it is supported but it works on bower 1.7.4

.bowerrc :

{
  "directory": "bower_components", 
  "proxy": "http://yourProxy:yourPort",
  "https-proxy":"http://yourProxy:yourPort",
  "no-proxy":"myserver.mydomain.com"
}

.bowerrc should be located in the root folder of your Javascript project, the folder in which you launch the bower command. You can also have it in your home folder (~/.bowerrc).

Solution 3 - Proxy

I had ETIMEDOUT error, and after putting

{
  "proxy":"http://<user>:<password>@<host>:<port>",
  "https-proxy":"http://<user>:<password>@<host>:<port>"
}

just worked. I don't know if you have something wrong in the .bowerrc or ECONNRESET can't be solved with this, but I hope this help you ;)

Solution 4 - Proxy

I struggled with this from behind a proxy so I thought I should post what I did. Below one is worked for me.

-> "export HTTPS_PROXY=(yourproxy)"

Solution 5 - Proxy

The key for me was adding an extra line, "strict-ssl": false

Create .bowerrc on root folder, and add the following,

{
  "directory": "bower_components", // If you change this, your folder named will change within dependecies. EX) Vendors instead of bower_components.
  "proxy": "http://yourProxy:yourPort",
  "https-proxy":"http://yourProxy:yourPort",
  "strict-ssl": false 
}

Best of luck for the people still stuck on this.

Solution 6 - Proxy

There is no way to configure an exclusion to the proxy settings, but a colleague of mine had an create solution for that particular problem. He installed a local proxy server called cntlm. That server supports ntlm authentication and exclusions to the general proxy settings. A perfect match.

Solution 7 - Proxy

Inside your local project open the .bowerrc that contains:

{
   "directory": "bower_components"
 }

and add the following code-line:

{
   "directory": "bower_components",
  "proxy": "http://yourProxy:yourPort",
  "https-proxy":"http://yourProxy:yourPort"
}

bower version: 1.7.1

Cheers

Solution 8 - Proxy

Add the below entry to your .bowerrc:

{
  "proxy":"http://<user>:<password>@<host>:<port>",
  "https-proxy":"http://<user>:<password>@<host>:<port>"
}

Also if your password contains any special character URL-encode it Eg: replace the @ character with %40

Solution 9 - Proxy

Are you using Windows? Just set the environment variable http_proxy...

set http_proxy=http://your-proxy-address.com:port

... and bower will pick this up. Rather than dealing with a unique config file in your project folder - right? (side-note: when-the-F! will windows allow us to create a .file using explorer? c'mon windows!)

Solution 10 - Proxy

create .bowerrc file in you home directory and adding this to the file worked for me

{

 "directory": "bower_components",
 "proxy": "http://youProxy:yourPort",
  "https-proxy":"http://yourProxy:yourPort"
}

Solution 11 - Proxy

add in .bowerrc

{SET HTTP_PROXY= http://HOST:PORT,SET HTTPS_PROXY=http://HOST:PORT}

In NPM, you must to execute in console this:

npm --proxy http://Host:Port install

Attributions

All content for this solution is sourced from the original question on Stackoverflow.

The content on this page is licensed under the Attribution-ShareAlike 4.0 International (CC BY-SA 4.0) license.

Content TypeOriginal AuthorOriginal Content on Stackoverflow
QuestionJohann SonntagbauerView Question on Stackoverflow
Solution 1 - ProxyItsik AvidanView Answer on Stackoverflow
Solution 2 - ProxyloicmathieuView Answer on Stackoverflow
Solution 3 - ProxyeastolfiView Answer on Stackoverflow
Solution 4 - ProxyVaraView Answer on Stackoverflow
Solution 5 - ProxymisterzikView Answer on Stackoverflow
Solution 6 - ProxyJohann SonntagbauerView Answer on Stackoverflow
Solution 7 - ProxyRene Cejas BolecekView Answer on Stackoverflow
Solution 8 - ProxyVishnu V RView Answer on Stackoverflow
Solution 9 - ProxyAdam CoxView Answer on Stackoverflow
Solution 10 - ProxyAtyam SriharshaView Answer on Stackoverflow
Solution 11 - ProxyCristian AgudeloView Answer on Stackoverflow