Bower over HTTPS

Asif Ahmed

A couple days ago I was trying to install the capstone for a Thinkful Angular class (more on that next week) on an external server. I had finished writing the code and I was ready to deploy. I ran my “npm install” and though it took a while it ran smoothly. However my “bower install” didn’t run smoothly at all. I would get an error saying that I couldn’t connect to Github. I would get a screen similar to the one below

Bower Error

After a bit of searching, I found the solution on StackOverflow here –

Basically bower downloading the files over the git protocol. If you have a firewall that is blocking incoming traffic on port 9418 (reference), however, then you won’t be able to download anything with Bower. To resolve this issue you need to configure git clone to use https instead of using git. This can be done with a simple bash command listed below:

After running this command, I was able to use “bower install” easily and I got my application online. If you are running into a firewall issue with Bower, try the same fix.