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?

gmsantos
  • 1,412
  • 22
  • 30
AnandhaSundari M
  • 1,098
  • 2
  • 10
  • 23
  • Seems your corporate proxy doesn't want you to communicate with github? Verify your proxy settings. The command that fails works fine here. :) – AndersNS Mar 02 '15 at 08:57

2 Answers2

1

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

agua from mars
  • 16,428
  • 4
  • 61
  • 70
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://stackoverflow.com/a/29605933/3131828.

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.

Community
  • 1
  • 1
MagicMau
  • 305
  • 3
  • 10