bower install self_signed_cert_in_chain

后端 未结 5 416
醉话见心
醉话见心 2021-02-01 15:18

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 som

相关标签:
5条回答
  • 2021-02-01 15:23

    Add the lines below into your .bowerrc file in your project directory:

    "strict-ssl": false,
     "https-proxy": "" .
    

    your .bowerrc should look like this:

    {
     "directory": "app/bower_components",
     "strict-ssl": false,
     "https-proxy": "" 
     }
    
    0 讨论(0)
  • 2021-02-01 15:37

    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
    0 讨论(0)
  • 2021-02-01 15:38

    If you have access to the self-signed CA certificate that is part of your chain, you can add it to your .bowerrc file like so:

    {
      ...
      "ca": "/path/to/cacert.pem",
      ...
    }
    

    rather than disabling SSL, as other answers have suggested.

    Disabling SSL will get you past this issue. However, doing so introduces the risk of creating some greater issues for yourself down the road.

    documentation from Bower

    0 讨论(0)
  • 2021-02-01 15:44

    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": ""
    }
    
    0 讨论(0)
  • 2021-02-01 15:47

    Try setting the registry config for npm by running the following command:

    npm config set registry http://registry.npmjs.org/
    

    I tried and it worked for me.

    0 讨论(0)
提交回复
热议问题