Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Git / Bower Errors: Exit Code # 128 & Failed connect

Tags:

git

bower

I am using Bower to install several libraries. For demonstration purposes here, I am installing bootstrap. Regardless of the package, I receive the following errors:

C:\Scott>bower install bootstrap
bower not-cached    git://github.com/twbs/bootstrap.git#*
bower resolve       git://github.com/twbs/bootstrap.git#*
bower ECMDERR       Failed to execute "git ls-remote --tags --heads git://github
.com/twbs/bootstrap.git", exit code of #128

Additional error details:
fatal: unable to access 'https://github.com/twbs/bootstrap.git/': Failed connect
to github.com:443; No error    

I have tried using the following solution to remove the first error - which I found from this search:

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

However, this does not work nor do any of the other solutions found on that page. Searching for a solution for the 2nd error, it seems that setting a username/pwd for a proxy server will resolve the issue if you are on a corporate network/behind a firewall. However, I am not using a proxy server as I am on my home pc/network (windows 7 x64).

Thanks!

EDIT: Command window with errors:

enter image description here

like image 519
azsl1326 Avatar asked Feb 04 '14 05:02

azsl1326


4 Answers

I know this is not "fixing" the problem, but you can use

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

to tell git to use HTTPS instead of GIT which worked out for me to install npm dependencies.

like image 81
ablais Avatar answered Nov 12 '22 22:11

ablais


Instead to run this command:

 git ls-remote --tags --heads git://github.com/twbs/bootstrap.git

you should run this command:

 git ls-remote --tags --heads [email protected]:twbs/bootstrap.git

or

 git ls-remote --tags --heads https://github.com/twbs/bootstrap.git

or you can run git ls-remote --tags --heads git://github.com/twbs/bootstrap.git but you need to make git always use https in this way:

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

Reference: https://github.com/bower/bower/issues/50

like image 38
antonjs Avatar answered Nov 12 '22 22:11

antonjs


I came across this with my corporate network.

It seemed strange because I've always been using ssh to connect with git and never had an issue.

I tried https and didn't work so I added proxy settings to git's config and all was well

git config --global http.proxy http://proxyuser:[email protected]:8080
git config --global https.proxy https://proxyuser:[email protected]:8080

And making sure it worked

git config --list
like image 20
Frank Fu Avatar answered Nov 13 '22 00:11

Frank Fu


Port 22 was being blocked on my computer. Once I found what was blocking it and opened the port, I was able to run the bower install cmd without any issues.

like image 8
azsl1326 Avatar answered Nov 12 '22 23:11

azsl1326