Long Topics

Menu

Month: June 2015

I recently discovered that Bower was failing to install components of an Angular project because the public library wifi that I was using blocked the port that GIT uses to grab things using its git:// protocol. The following error occurs for the first attempted GITHUB download:

One way to fix that is to change to https://. But many people do not want to reconfigure their GIT profile and then have to change it back.

This should work for you if you do not want to alter your personal profile’s GIT configuration. It configures only your project directory.

If you are already working in a GIT configured project directory, you already have a “.git” folder and “config” file. If you have no “.git” folder and “config” file, create a “.git” folder with a “config” file in it.

--project (folder)
--.git (subfolder)
--config (file)

Run the following LOCAL GIT configuration command (do NOT use “–global” which will change your profile configuration) while in your project folder as the current working directory:

[project folder] $ git config url."http://".insteadOf git://

That should enter the following into your “.git/config” file:

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

You can also just type that into the “config” file. Those lines change the protocol from git:// to https://.