Skip to content
This repository has been archived by the owner on Feb 26, 2024. It is now read-only.

bower install - github.com connection timed out #141

Closed
pmichna opened this issue Apr 14, 2014 · 61 comments
Closed

bower install - github.com connection timed out #141

pmichna opened this issue Apr 14, 2014 · 61 comments

Comments

@pmichna
Copy link

pmichna commented Apr 14, 2014

pmichna@p:~/angular-phonecat$ npm install

> angular-phonecat@0.0.0 postinstall /home/pmichna/angular-phonecat
> bower install

bower angular-mocks#~1.2.15 not-cached git://github.com/angular/bower-angular-mocks.git#~1.2.15
bower angular-mocks#~1.2.15    resolve git://github.com/angular/bower-angular-mocks.git#~1.2.15
bower bootstrap#~3.1.1      not-cached git://github.com/twbs/bootstrap.git#~3.1.1
bower bootstrap#~3.1.1         resolve git://github.com/twbs/bootstrap.git#~3.1.1
bower angular#1.2.x         not-cached git://github.com/angular/bower-angular.git#1.2.x
bower angular#1.2.x            resolve git://github.com/angular/bower-angular.git#1.2.x
bower jquery#1.10.2         not-cached git://github.com/jquery/jquery.git#1.10.2
bower jquery#1.10.2            resolve git://github.com/jquery/jquery.git#1.10.2
bower angular-resource#~1.2.15       not-cached git://github.com/angular/bower-angular-resource.git#~1.2.15
bower angular-resource#~1.2.15          resolve git://github.com/angular/bower-angular-resource.git#~1.2.15
bower angular-route#~1.2.15          not-cached git://github.com/angular/bower-angular-route.git#~1.2.15
bower angular-route#~1.2.15             resolve git://github.com/angular/bower-angular-route.git#~1.2.15
bower angular-animate#~1.2.15        not-cached git://github.com/angular/bower-angular-animate.git#~1.2.15
bower angular-animate#~1.2.15           resolve git://github.com/angular/bower-angular-animate.git#~1.2.15
bower angular-route#~1.2.15             ECMDERR Failed to execute "git ls-remote --tags --heads git://github.com/angular/bower-angular-route.git", exit code of #128

Additional error details:
fatal: unable to connect to github.com:
github.com[0: 192.30.252.130]: errno=Connection timed out

npm ERR! angular-phonecat@0.0.0 postinstall: `bower install`
npm ERR! Exit status 1
npm ERR! 
npm ERR! Failed at the angular-phonecat@0.0.0 postinstall script.
npm ERR! This is most likely a problem with the angular-phonecat package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR!     bower install
npm ERR! You can get their info via:
npm ERR!     npm owner ls angular-phonecat
npm ERR! There is likely additional logging output above.
npm ERR! System Linux 3.11.0-19-generic
npm ERR! command "/usr/bin/node" "/usr/bin/npm" "install"
npm ERR! cwd /home/pmichna/angular-phonecat
npm ERR! node -v v0.10.26
npm ERR! npm -v 1.4.3
npm ERR! code ELIFECYCLE
npm ERR! 
npm ERR! Additional logging details can be found in:
npm ERR!     /home/pmichna/angular-phonecat/npm-debug.log
npm ERR! not ok code 0

Sometimes it times out on angular-animate, sometimes on bootstrap, sometimes on something else. What's wrong?

@petebacondarwin
Copy link
Member

Sounds like you have a flaky connection to github...

@pmichna
Copy link
Author

pmichna commented Apr 14, 2014

I'm new to AngularJS, node.js and npm. Any way to do manually what needs to be done?

@petebacondarwin
Copy link
Member

Hi @pmichna.

Angular phonecat uses bower to retrieve its dependencies including AngularJS, from github.

The problem is that from where you are the connection to the github servers is not being very reliable. Github is a separate service, not controlled by AngularJS or bower.

It is hard to know what the problem is. It could be a transient issue that will go away if you try again later. It may be that you have some kind of firewall that is intermittently blocking connections.

@pmichna
Copy link
Author

pmichna commented Apr 15, 2014

Ok, I contacted IT support in my company. However, that's strange. I can normally ping github.com, I can do git clone from GitHub repositories. I can't understand what could be wrong then.

@pmichna
Copy link
Author

pmichna commented Apr 15, 2014

The problem was that bower tried to retrieve packages through git:// protocol, which seems to be blocked at my machine.

git config --global url."https://".insteadOf git:// solved the problem.

@pmichna pmichna closed this as completed Apr 15, 2014
@petebacondarwin
Copy link
Member

Excellent. Glad you worked it out. Well done.

@karthigb
Copy link

Thanks @pmichna I was having the same problem 👍

@maximeberthelot
Copy link

Thanks ! It resolve now !

@gregory
Copy link

gregory commented Jun 17, 2014

awesome! Indeed this issue happened to me cause i was behind firewall restriction on protocols :)

@deepaksinghvi
Copy link

Thanks, its very helpful.

@zckrs
Copy link

zckrs commented Jun 19, 2014

👍

@alexandremaeda
Copy link

Thanks, solved for me!

@DerGitHubUser
Copy link

git config --global url."https://".insteadOf git:// worked here too. Seeing I'm new to Node, Git and the rest , this was a great find.

Thank you.

@yogesh-raj
Copy link

I found this issue ... how to solve

bower ECMDERR Failed to execute "git ls-remote --tags --heads git://github
.com/agrublev/angularLocalStorage.git", exit code of #128

Additional error details:
fatal: unable to access 'https:// https:/// github.com/agrublev/angularLocalSt
orage.git/': Could not resolve host: <https

npm ERR! trader-desktop@0.0.0 postinstall: bower install
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the trader-desktop@0.0.0 postinstall script.
npm ERR! This is most likely a problem with the trader-desktop package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR! bower install
npm ERR! You can get their info via:
npm ERR! npm owner ls trader-desktop
npm ERR! There is likely additional logging output above.
npm ERR! System Windows_NT 6.1.7601
npm ERR! command "C:\Program Files (x86)\nodejs\node.exe" "C:\Program File
s (x86)\nodejs\node_modules\npm\bin\npm-cli.js" "install"
npm ERR! cwd D:\GitProject\trader-desktop-angular
npm ERR! node -v v0.10.29
npm ERR! npm -v 1.4.14
npm ERR! code ELIFECYCLE
npm ERR!
npm ERR! Additional logging details can be found in:
npm ERR! D:\GitProject\trader-desktop-angular\npm-debug.log
npm ERR! not ok code 0
|
npm ERR! trader-desktop@0.0.0 prestart: npm install
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the trader-desktop@0.0.0 prestart script.
npm ERR! This is most likely a problem with the trader-desktop package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR! npm install
npm ERR! You can get their info via:
npm ERR! npm owner ls trader-desktop
npm ERR! There is likely additional logging output above.
npm ERR! System Windows_NT 6.1.7601
npm ERR! command "C:\Program Files (x86)\nodejs\node.exe" "C:\Program File
s (x86)\nodejs\node_modules\npm\bin\npm-cli.js" "start"
npm ERR! cwd D:\GitProject\trader-desktop-angular
npm ERR! node -v v0.10.29
npm ERR! npm -v 1.4.14
npm ERR! code ELIFECYCLE
npm ERR!
npm ERR! Additional logging details can be found in:
npm ERR! D:\GitProject\trader-desktop-angular\npm-debug.log
npm ERR! not ok code 0

@dgokulakrishnan
Copy link

Hi Yogeshm, I am facing the same issue. Did you find any solution?

fatal: unable to access 'https:// https:/// github.com/es-shims/es5-shim.git/': Could not resolve host: <https

@petebacondarwin
Copy link
Member

@yogesh-raj and @dgokulakrishnan - did you try the git config --global url."https://".insteadOf git:// fix?

@yogesh-raj
Copy link

@pete and @dgokulakrishnan yes this helped me... it solved ma issue some
day back ... sorry @pete i couldn't update you that time.

On Sun, Jul 27, 2014 at 1:23 AM, Pete Bacon Darwin <notifications@github.com

wrote:

@yogesh-raj https://github.com/yogesh-raj and @dgokulakrishnan
https://github.com/dgokulakrishnan - did you try the git config
--global url."https://".insteadOf git:// fix?


Reply to this email directly or view it on GitHub
#141 (comment)
.

*Thanks & Regards, *

Yogesh Raj (Yash Jarainiya)
9873458581 || 9310866464 || www.LevisKart.com || www.facebook.com/LevisKart

@pete
Copy link

pete commented Jul 28, 2014

@yogesh-raj You're welcome, but I don't think I did much to help.

@petebacondarwin
Copy link
Member

@pete :-)

@dgokulakrishnan
Copy link

@pete and @yogesh-raj Thanks for your responses..Initially I did not set the config property properly. It worked only after doing the unset and replace all.

git config --global --unset-all url.https
git config --global –replace-all url.https “//.insteadof=git://”

@vinceFC
Copy link

vinceFC commented Aug 19, 2014

Thanks for the trick. Worked for me!

@francoiscoron
Copy link

Thank's so much @pmichna !

@wdalrymple
Copy link

this didn't work for me at all. Bower / git is still using the "git://"

@wovalle
Copy link

wovalle commented Oct 21, 2014

@pmichna Thank you! now I can do bower installs through my company's firewall.

@claudia1204
Copy link

@pmichna :
Thank you very much!!!
I solved this problem with this command: git config --global url."https://".insteadOf git;
reason: firewall

@erdemildiz
Copy link

@pmichna Thanks

@HarishBoke
Copy link

Thanks a lot! @pmichna git config --global url."https://".insteadOf git:// solved the problem.

@Priyanka-Naik
Copy link

thanks 👍

@celsonrd
Copy link

celsonrd commented Jul 7, 2015

Obrigado! otima dica.

@wholehogsoftware
Copy link

Works for me as well.

@seb-pax
Copy link

seb-pax commented Aug 21, 2015

Ca marche pour moi aussi ...
Thanks a lot

@torcellite
Copy link

Ah, thank you.

@arcreative
Copy link

👍 This works for me as well... thanks guys!

@huangruoyu
Copy link

great! very helpful!!!

@borislopezaraoz
Copy link

Thanks! great tip

@AtulKamra
Copy link

I am getting issue while running a job from Jenkins for connecting to Git for building code. any idea what can be done to fix this?

Error -

Started by user anonymous
Building in workspace /var/jenkins_home/jobs/iOS_Build/workspace

git rev-parse --is-inside-work-tree # timeout=10
Fetching changes from the remote Git repository
git config remote.origin.url GIT Repository URL # timeout=10
Fetching upstream changes from GIT Repository URL > git --version # timeout=10
using .gitcredentials to set credentials
git config --local credential.username USER_NAME# timeout=10
git config --local credential.helper store --file=/tmp/git5514383632996462831.credentials # timeout=10
git -c core.askpass=true fetch --tags --progress GIT Repository URL +refs/heads/:refs/remotes/origin/

git config --local --remove-section credential # timeout=10
ERROR: Error fetching remote repo 'origin'
hudson.plugins.git.GitException: Failed to fetch from GIT Repository URL
at hudson.plugins.git.GitSCM.fetchFrom(GitSCM.java:763)
at hudson.plugins.git.GitSCM.retrieveChanges(GitSCM.java:1012)
at hudson.plugins.git.GitSCM.checkout(GitSCM.java:1043)
at hudson.scm.SCM.checkout(SCM.java:485)
at hudson.model.AbstractProject.checkout(AbstractProject.java:1275)
at hudson.model.AbstractBuild$AbstractBuildExecution.defaultCheckout(AbstractBuild.java:610)
at jenkins.scm.SCMCheckoutStrategy.checkout(SCMCheckoutStrategy.java:86)
at hudson.model.AbstractBuild$AbstractBuildExecution.run(AbstractBuild.java:532)
at hudson.model.Run.execute(Run.java:1741)
at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:43)
at hudson.model.ResourceController.execute(ResourceController.java:98)
at hudson.model.Executor.run(Executor.java:408)
Caused by: hudson.plugins.git.GitException: Command "git -c core.askpass=true fetch --tags --progress GIT Repository URL +refs/heads/:refs/remotes/origin/" returned status code 128:
stdout:
stderr: fatal: unable to access 'GIT Repository URL ': Failed to connect to stash.com port 443: Connection timed out

at org.jenkinsci.plugins.gitclient.CliGitAPIImpl.launchCommandIn(CliGitAPIImpl.java:1640)
at org.jenkinsci.plugins.gitclient.CliGitAPIImpl.launchCommandWithCredentials(CliGitAPIImpl.java:1388)
at org.jenkinsci.plugins.gitclient.CliGitAPIImpl.access$300(CliGitAPIImpl.java:62)
at org.jenkinsci.plugins.gitclient.CliGitAPIImpl$1.execute(CliGitAPIImpl.java:313)
at hudson.plugins.git.GitSCM.fetchFrom(GitSCM.java:761)
... 11 more

ERROR: null

@paulkr
Copy link

paulkr commented Nov 27, 2015

git config --global url."https://".insteadOf git:// worked for me! Thanks!

@guilherme22
Copy link

git config --global url."https://".insteadOf git:// worked for me too ! Thanks !

@swapy
Copy link

swapy commented Dec 28, 2015

Yes this works perfect! Thanks.

@git-msp
Copy link

git-msp commented Jan 26, 2016

I did git config --global url."https://".insteadOf git://
but still issue

fatal: unable to access 'https://github.com/git-msp/CubeGeneratorWeb.git/': Failed to connect to 192.135.82.70 port 1080: Timed out

@neakves
Copy link

neakves commented Feb 17, 2016

Tanks Brow
git config --global url."https://".insteadOf git://
It worked !

@phppa
Copy link

phppa commented Feb 19, 2016

Excelente, resolveu o problema !

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

@PStoner3
Copy link

PStoner3 commented May 3, 2016

I am still experiencing this issue.
Here is my global .gitconfig
[filter "lfs"]
required = true
clean = git-lfs clean %f
smudge = git-lfs smudge %f
[user]
name = Paul Stoner
email = pstoner6765@gmail.com
[core]
gitProxy = "ssh" for "kernal.org"
gitProxy=default-proxy
[http]
proxy = http://:
[https]
proxy = http://:
[url "https://"]
insteadOf = git://

As you can see, I've set my proxy, set the url.https. Nothing seems to work.
I am running
Node V5.0.0
npm v3.8.9
bower v1.7.9
git v2.8.1.windows.1

I simply cannot seem to get bower working

@ChrisGrigg
Copy link

@PStoner3 I was in the same predicament as you. To solve it I just removed "http.proxy", "https.proxy" and "url..insteadOf" from the global and local .gitconfig files and it worked. Perhaps I had conflicts with other settings on my system and simplifying things helped.

@saumyaraj
Copy link

@pmichna Thanks. Appreciate!!

@brandonmceachern
Copy link

I'm working behind a firewall and change the config url.. Also, I keep trying bower install. The downloads would time out but each try added more to the cache so eventually I had all the dependencies.

@savanr
Copy link

savanr commented Oct 6, 2016

For me reverse engineering works 😜

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

If you have manually run above commands then you should remove those entries first from ~/.gitconfig file. So for that open that file

nano ~/.gitconfig

Replace these lines

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

with this

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

Save and restart your terminal.

@cdll
Copy link

cdll commented Mar 13, 2017

git config --global url."https://".insteadOf git:// did not solve my problem but git config --global url."git://".insteadOf https:// that @savanr said help me a lot~
hope everyone see here and so much thank to @savanr 😊

@skyrw
Copy link

skyrw commented Aug 22, 2018

bower d3#3.5.6 ECMDERR Failed to execute "git ls-remote --tags --heads https://github.com/mbostock-bower/d3-bower.git", exit code of #128 error: while accessing https://github.com/mbostock-bower/d3-bower.git/info/refs fatal: HTTP request failed
Additional error details:
error: while accessing https://github.com/mbostock-bower/d3-bower.git/info/refs
fatal: HTTP request failed

I met the above error message,and it use 'https',What should I do,thanks

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests