How to fix bower ECMDERR

72,273

Solution 1

In case you might encounter the same issue...It turns out my machine behind firewall, that won't able to access git://github.com/jquery/jquery.git

Link: Unable to Connect to GitHub.com For Cloning

The solution without changing the firewall:

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

Credit to @bnguyen82 from Unable to Connect to GitHub.com For Cloning and @Sindre Sorhus from Bower install using only https?

Solution 2

I had the same problem and the answer above didn't work for me. But I found an other one. You can have a problem with your proxy. If you are behind a proxy you have to do theses steps :

put this in .bowerrc to get rid of the err ETIMEDOUT :

{
    "directory": "app/bower_components",
    "proxy": "http://PROXYSERVER:PORT",
    "https-proxy": "https://PROXYSERVER:PORT",
    "strict-ssl": false
}

And this one to get rid of ECMDERR :

git config --global http.proxy http://USER:PASSWORD@PROXYSERVER:PORT

it works for me.

Solution 3

Following commands work for me

npm cache clean

bower cache clean

and then

bower install

Solution 4

For me updating git to the newest version helped.

Solution 5

To contribute to leoh's answer (since I don't have enough rep to post a comment):

If, like me, you found that you could not execute the command because git wasn't installed globally on your machine, opening Tools > Options in Visual Studio, then Projects and Solutions > Web Package Management > External Web Tools, you will see that, by default, there are two git locations:

  • $(DevEnvDir)\CommonExtensions\Microsoft\TeamFoundation\Team Explorer\Git\cmd
  • $(DevEnvDir)\CommonExtensions\Microsoft\TeamFoundation\Team Explorer\Git\mingw32\bin

By default (for Visual Studio 2017 Enterprise), these respectively map to:

  • C:\Program Files (x86)\Microsoft Visual Studio\2017\Enterprise\Common7\IDE\CommonExtensions\Microsoft\TeamFoundation\Team Explorer\Git\cmd
  • C:\Program Files (x86)\Microsoft Visual Studio\2017\Enterprise\Common7\IDE\CommonExtensions\Microsoft\TeamFoundation\Team Explorer\Git\mingw32\bin

Then open a command prompt (Windows + R > "cmd"), navigate to the above locations, and run leoh's command. I wasn't sure which to run it from, so I ran it from both just in case. The issue was resolved for me from then on.

Share:
72,273
leoh
Author by

leoh

Full Stack Developer

Updated on July 21, 2021

Comments

  • leoh
    leoh almost 3 years

    I'm using "yeoman" and "bower" on windows 7 but got the following error when I create the app

    yo webapp
    

    The error is

    bower not-cached    git://github.com/jlong/sass-bootstrap.git#~3.0.0
    bower resolve       git://github.com/jlong/sass-bootstrap.git#~3.0.0
    bower not-cached    git://github.com/Modernizr/Modernizr.git#~2.6.2
    bower resolve       git://github.com/Modernizr/Modernizr.git#~2.6.2
    bower not-cached    git://github.com/jquery/jquery.git#~1.10.2
    bower resolve       git://github.com/jquery/jquery.git#~1.10.2
    bower ECMDERR       Failed to execute "git ls-remote --tags --heads git://github
    .com/jquery/jquery.git", exit code of #128
    
    Additional error details:
    fatal: unable to connect to github.com:
    github.com[0: 192.30.252.130]: errno=No error
    

    The version of the yeoman, bower and node

    c:\yo-test>bower -v
    1.2.8
    
    c:\yo-test>yo -version
    1.1.2
    
    c:\yo-test>node -v
    v0.10.15
    

    Any suggestion is much appreciated.

  • Nate-Wilkins
    Nate-Wilkins about 10 years
    Will this have any other side effects?
  • leoh
    leoh about 10 years
    "Both ssh and https are equivalent, since Git 1.6.6+ (2010) and the implementation of smart http protocol" @VonC answered at stackoverflow.com/questions/3248779/…
  • Nick
    Nick over 9 years
    I had to define HOME in environment settings and point it to the folder that contained the .gitconfig file.
  • sol4me
    sol4me over 9 years
    (+1), for mentioning link to bower install question
  • ItayB
    ItayB almost 9 years
    For those who get here because of anjular.js installation problem, that's the solution! thanks!
  • Pankaj Jasoria
    Pankaj Jasoria over 8 years
    Awesome, make my day after a lots of try. finally its work for me. Thankyou :)
  • PeterM
    PeterM over 7 years
    Turned out that one of my entry in bower.json was with git://, changed to https:// - it solved my issue. Thanks for pointing right direction.
  • Jared Deckard
    Jared Deckard over 6 years
    If it took 2-3 tries after setting up a proxy, then it probably wasn't the proxy that fixed it. This error can happen if the remote server is unavailable, so you probably just retried until the server was available again.
  • Jared Deckard
    Jared Deckard over 6 years
    I highly doubt this directly fixed the issue in question. The time it took to install that tool was probably enough for the remote server to start responding to requests again.