Bower calls blocked by corporate proxy

前端 未结 16 1255
夕颜
夕颜 2020-11-30 20:00

I\'m trying to use Bower for a web app, but find myself hitting some sort of proxy issues:

D:\\>bower search jquery
bower retry         Request to https:/         


        
16条回答
  •  鱼传尺愫
    2020-11-30 20:57

    {
      "directory": "library",
      "registry": "http://bower.herokuapp.com",
      "proxy":"http://:@:/",
      "https-proxy":"http://:@:/"
    }
    

    This code worked for me. I am using Win 7 and chrome and also git bash. Here few things need to be cleared. This takes me huge time to find the actual data regarding the user name, password, proxy IP and Port. I will describe it step by step so that every learners can easily grasp the message:

    1. Create a file in the notepad named .bowerrc in the login folder; You can go there by typing at Start>Run>%UserProfile% and press OK.
    2. Type above code in the .bowerrc file with the following changes:

      Replace with your internet connection user ID or login ID

      Replace with your internet connection password or login password.
      Replace and with the working proxy IP address and its port number.

         **Note: There should be no angle brackets.**
      
    3. Proxy IP should be different than your own IP.

    4. Before using any proxy IP and port you should check it is working by changing your proxy IP and port.

    5. You can go through this link to know the details of proxy settings at description here

    6. From this proxy settings you will get Proxy IP and Port.
    7. Recheck all the input so that all are correct and save and close the file.
    8. Open git bash and change directory to the project file and type command and hit enter, in my case, git bash command:

    a@a-PC MINGW32 /d/conFusion

    $ bower install

    1. It worked like magic.

提交回复
热议问题