bower not working in Visual Studio 2015 Preview
Asked Answered
G

2

8

I am building a web application in Visual Studio 2015. I am behind corporate proxy. Installing packages via bower is not working.

I tried the following workarounds.

  1. Created a .bowerrc file in the solution with the following settings.

    {
      "proxy": "http://xxx.xxx.xxx.xxx:Port",
      "https-proxy": "http://xxx.xxx.xxx.xxx:Port",
      "strict-ssl": false
    }
    
  2. Installed Git. Changed the git configuration to use https:// instead of git://

When I run the following command
bower install
I get the following error.

bower ECMDERR Failed to execute "git ls-remote --tags --heads https://github.com/jzaefferer/jquery-validation.git", exit code of #128

Additional error details: fatal: unable to access 'https://github.com/jzaefferer/jquery-validation.git/': Failed connect to github.com:443; No error

Any idea what went wrong?

Glycerinate answered 27/2, 2015 at 7:24 Comment(1)
Seems your corporate proxy doesn't want you to communicate with github? Verify your proxy settings. The command that fails works fine here. :)Coriolanus
A
1

You need to set HTTP_PROXY and HTTPS_PROXY env var with your proxy settings in order to access git behind a proxy

Appalachian answered 5/3, 2015 at 16:7 Comment(2)
443 error code means https SSL error, did you try to access the url directly may be there's a certificates issueAppalachian
I tried to access the url directly from the browser. It is working fine.Glycerinate
B
0

I had a similar problem with Bower in VS2015 CTP. Managed to resolve it by commenting out two lines in the bower.cmd file that is used by VS: https://mcmap.net/q/439621/-vs-2015-bower-does-not-work-behind-firewall.

It basically makes sure that VS uses the Git I had already installed which respects my .gitconfig file. Apparently by default it uses a lightweight git.exe that does not read .gitconfig.

Brote answered 13/4, 2015 at 13:3 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.