Git protocol errors when using Bower package manager

I have just got back from a month long holiday (which was great). Anyway back to work now…..sigh

So the other day I was trying to get Yeoman to scaffold a new angular.js app for me, which worked fine. I then wanted to use the Bower package manager to download a package, and whoever created the package hosted it on Git. Bower can deal with this just fine. But if like me your network is locked down, where there are all sorts of firewall/proxy rules, you may not be able to use the git protocol.

Luckily this is an easy fix, and all you need to do is issue this command line to have git add a configuration rule to re-write git urls to https

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

What Changes Did This Command Make?

Take a look at your global configuration using:

git config --list

You’ll see the following line in the output:


You can see how this looks on file, by taking a peek at ~/.gitconfig where you should now see that the following two lines have been added:

[url "https://"]
    insteadOf = git://

And that is all there is to it, everything just worked after that.