Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

bower install self_signed_cert_in_chain

I am building a angular app in windows, using git bash, so far I have been able to scaffold using yo, no issues, however when I am trying to issue the following command. Can someone please point me to resolve this issue.

bower install angular-bootstrap

I am getting the following error:

bower error         Request to https://bower.herokuapp.com/packages/angular-reso urce failed: SELF_SIGNED_CERT_IN_CHAIN  Stack trace: Error: Request to https://bower.herokuapp.com/packages/angular-resource failed: SELF_SIGNED_CERT_IN_CHAIN     at createError (c:\Users\arusarka\AppData\Roaming\npm\node_modules\bower\nod e_modules\bower-registry-client\lib\util\createError.js:2:15)     at Request._callback (c:\Users\arusarka\AppData\Roaming\npm\node_modules\bow er\node_modules\bower-registry-client\lib\lookup.js:97:29)     at self.callback (c:\Users\arusarka\AppData\Roaming\npm\node_modules\bower\n ode_modules\request\request.js:129:22)     at Request.EventEmitter.emit (events.js:95:17)     at Request.request.emit (c:\Users\arusarka\AppData\Roaming\npm\node_modules\ bower\node_modules\bower-registry-client\node_modules\request-replay\index.js:69 :33)     at ClientRequest.self.clientErrorHandler (c:\Users\arusarka\AppData\Roaming\ npm\node_modules\bower\node_modules\request\request.js:239:10)     at ClientRequest.EventEmitter.emit (events.js:95:17)     at CleartextStream.socketErrorListener (http.js:1528:9)     at CleartextStream.EventEmitter.emit (events.js:95:17)     at SecurePair.<anonymous> (tls.js:1368:19) 
like image 879
Arup Sarkar Avatar asked Oct 02 '13 18:10

Arup Sarkar


2 Answers

It finally worked for me. These are the steps I took:

  1. Uninstall bower from npm npm uninstall bower or npm uninstall -g bower
  2. Install bower-canary from npm npm install bower-canary or npm install -g bower-canary
  3. Create .bowerrc in your project directory with the following content to turn off SSL:
{ "strict-ssl": false,  "https-proxy": "" } 
  1. Then try again bower install angular-bootstrap
like image 65
natdico Avatar answered Sep 30 '22 00:09

natdico


Search for .bowerrc in your npm folder of Appdata, open the file and include the properties mentioned by natdico as follows:

{     "directory": "bower_components",     "strict-ssl": false,      "https-proxy": "" } 
like image 22
Nikhil Madhamshettiwar Avatar answered Sep 29 '22 23:09

Nikhil Madhamshettiwar