VS 2015 + Bower: Does not work behind firewall VS 2015 + Bower: Does not work behind firewall git git

VS 2015 + Bower: Does not work behind firewall


Same problem using VS 2015, my workaround :

  1. Install Git

    http://git-scm.com/

  2. Configure Git to use http instead of git:// with Git Bash

    git config --global url."http://".insteadOf git://

    Edit (as pointed by g.pickardou) you can use https to be more secure:

    git config --global url."https://".insteadOf git://

  3. Configure VS to use the new installed Git over VS Git

    Right click on Bower folder (under Dependencies), then select "Configure external tools"

    Uncheck "$(DevEnvDir)\Extensions\Microsoft\Web Tools\External\git"

    Add a new node with "C:\Program Files (x86)\Git\bin"

Hope this will help someone,

Rogerio


Microsoft's version of git that is installed (at least with VS2015 Update 1) does honor the .gitconfig file, but the tooling that is installed by default does not give you a way to manipulate it (like all the other answers show using git config to fix the problem).

To fix the problem without any extra installations and whatnot, simply create a .gitconfig file in C:\Users\YourUserName and put this content in there (which is the content that git config --global would do but since you dont have a git.exe that can change config, you cannot use that without installing something else you do not really need)

    [url "https://github.com/"]        insteadOf = git@github.com:    [url "https://"]        insteadOf = git://


The solution that worked for me with VS2015 Release is to :

  1. Install git command line tool.
  2. Modify the file C:\Program Files (x86)\Microsoft Visual Studio14.0\Common7\IDE\Extensions\Microsoft\Web Tools\External\bower.cmd with this content:

    set PATH=C:\Program Files (x86)\Git\bin\;%PATH%git config --global url."http://".insteadOf git://git config -l@"%~dp0\node\node" "%~dp0\bower\node_modules\bower\bin\bower" %*