VS 2015 + Bower: Does not work behind firewall

bower, firewall, git, git-config, visual-studio-2015

Solution

Same problem using VS 2015, my workaround :

Install Git

http://git-scm.com/

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://

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

Problem

Problem In Visual Studio 2015, using bower, my package restores fail when behind a firewall with an error similar to: ECMDERR Failed to execute "git ls-remote --tags --heads git://github.com/jzaefferer/jquery-validation.git", exit code of #-532462766 I have updated my git config to use `http` instead of git. When I run from my command line, the command is successful: But Visual Studio or one of its components appears to be using `git` instead of `http` regardless. Background & First Attempt to Resolve Using Visual Studio 2015 and Bower for package management. It works great when not behind a firewall, but when behind a firewall I cannot use the `git://` protocol. The solution -- documented in many other places on SO (example), is to run: ``` git config --global url."http://".insteadOf git:// ``` I did this, and now my `git config -l` looks like: ``` ore.symlinks=false core.autocrlf=true color.diff=auto color.status=auto color.branch=auto color.interactive=true pack.packsizelimit=2g help.format=html http.sslcainfo=/bin/curl-ca-bundle.crt sendemail.smtpserver=/bin/msmtp.exe diff.astextplain.textconv=astextplain rebase.autosquash=true user.name=Sean Killeen user.email=SeanKilleen@gmail.com url.http://.insteadof=git:// ``` But despite this, either Visual Studio / npm is not respecting my configuration, or is using an old, cached version of it. Second Attempt to Resolve Per this thread on npm issue, I saw that npm (which presumably bower is using in VS) uses the `git@` syntax. Even though this isn't what I saw in the output, I figured I'd give it a shot. I ran: ``` git config --global url."https://github.com/".insteadOf git@github.com: ``` I then restarted Visual Studio, but the issue still persists. The fix I'd read about was likely never applicable. Any ideas on how to fix?

Original source

Related problems