bower package installation issues with git / https

1

Here is my OS: (But installed in my laptop using VM - Virtualbox via vagrant)

Distributor ID: Ubuntu
Description: Ubuntu 12.04.4 LTS
Release: 12.04
Codename: precise

The problem I am facing is that when I try to do:

bower install jquery

I am getting this error:

bower retry         Request to https://bower.herokuapp.com/packages/jquery failed with ETIMEDOUT, retrying in 1.2s

At first I was suspecting my machine couldn't access https, but a simple test with wget like below, I am able to get a respond from the URL via https:

wget -qO- https://bower.herokuapp.com/packages/jquery

and get the following response:

{"name":"jquery","url":"git://github.com/components/jquery.git"}

After some digging through Internet, there are other similar incident where it is solved by doing the following:

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

But this is not working for me, I am not sure if there is other way I can make this work as apparently my company firewall is somehow preventing this.

My company is not using any proxy services, so I am suspecting there is some rules in firewall that is causing this as using the same machine outside of my company network I don't have this problem at all.

Out company IT dept. is definitely not going to do anything for me or support me in anyway, so I have resorted to ask advise or work around here.

[EDIT]

I have done more testing where the following will work [even without the git config to force git to use https]:

bower install jquery=http://bower.herokuapp.com/packages/jquery

But why bower will not work with https? because I have try to do wget -qO- https://bower.herokuapp.com/packages/jquery and I didn't get any timeout.

I have also tried to update .bowerrc to include the following

{
    "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10.7; rv:22.0) Gecko/20100101 Firefox/22.0"
}

But I am still getting the same problem, is there anything else I can do?

forestclown

Posted 2014-02-13T06:49:26.083

Reputation: 461

Or is it possible to force everything through http? – forestclown – 2014-02-13T06:56:43.497

Answers

1

The problem is probably specific to the network environment, and the OS build I have so far the problem is gone after I have updated bower package.json to change one of the dependency from "request": "~2.27.0" to "request": "~2.33.0"

Checking bower github repo, the package.json is updated with the latest dependencies versions, but doing npm install bower still having the old dependencies though. So currently I am updating the file package.json manually.

forestclown

Posted 2014-02-13T06:49:26.083

Reputation: 461

0

Did you ever see the solution:

bower install git+https://path/to/the.git?

The git+https forces git to use https instead of the default port.

Jack Stone

Posted 2014-02-13T06:49:26.083

Reputation: 101