VS 2015 + Bower: Does not work behind firewall

前端 未结 12 2207
一向
一向 2020-11-29 01:40

Problem

In Visual Studio 2015, using bower, my package restores fail when behind a firewall with an error similar to:

ECMDERR Failed to exec

12条回答
  •  执笔经年
    2020-11-29 02:20

    If you want a global solution.

    WARNING: it can impact several proxy settings through different application but it certainly what you want :)

    NOTE If you have special characters in your username:password in your proxy settings, you need to URLENCODED them. Example: http://DOMAIN%5Cuser+name%3AP%40%24%24w0rd@proxy.server.com:8080

    You must add 2 environment variable.

    • HTTP_PROXY: http://proxyuser:proxypwd@proxy.server.com:8080
    • HTTPS_PROXY: http://proxyuser:proxypwd@proxy.server.com:8080

    To do that on windows 10:

    1. START
    2. Search "Edit the system environment variables"
    3. (in the adanced tab of system properties) click on "Environment Variables...)
    4. (in System variable) click "New..."
    5. Create Variable (Variable name: HTTP_PROXY, Variable value: http://proxyuser:proxypwd@proxy.server.com:8080)
    6. Create Variable (Variable name: HTTPS_PROXY, Variable value: http://proxyuser:proxypwd@proxy.server.com:8080)
    7. Restart Windows

提交回复
热议问题