Solving Connection Problems in Bower and Git

I’m still new to the world of Node.js, Bower and Gulp. When I run into an error I often don’t know if it was my fault or if the environment is in shambles. A few days ago I was facing this error message, which turned a simple rebuild of the application into a journey into the depths of the environment:

When you know what you are dealing with, then this error message is simple. In all other cases you may start asking yourself why github.com has problems and what is expected from you to fix this.

Fortunately Google helped me to find a few answers to similar problems that I could adapt to solve my problem. As it turns out, my connection errors came from the protocol. The URL to the repository starts with git://, which our firewall doesn’t like. When I replace git:// with https:// then the command succeeds:

 

Switching git:// to https://

To automatically switch every git:// to https:// you can use the global configuration file of git. All you need to write is this command:

This will from now on replace all git:// with https:// whenever I call git anywhere on my system (thanks to the –global flag). The command writes the following lines into the .gitconfig file:

 

Conclusion

The problem may not be you or your environment. It can also be your firewall or any other systems that needs to work in order to fulfill a local request like rebuilding your application. Therefore be open to solutions in parts you don’t believe that they’re related.

Leave a Comment

This site uses Akismet to reduce spam. Learn how your comment data is processed.