Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Bower Install error: Unable to connect & exit code of #128

I am facing an issue on bower install.

bower ECMDERR Failed to execute "git ls-remote --tags --heads HTTPS_LINK to bower-angular-mocks.git", exit code of #128

I followed suggestions mentioned in Git / Bower Errors: Exit Code # 128 & Failed connect. I have made the recommended proxy settings for both GIT & Bower.

.bowerrc

"proxy" : "PROXY_URL",
"https-proxy" : "PROXY_URL"

GIT

http.proxy=PROXY_URL
git config --global url."https://".insteadOf git:// [GIT config to use HTTPS in place of GIT]

Here is my complete error log:

bower not-cached    HTTPS_LINK to bower-angular.git#1.2.x
bower resolve       HTTPS_LINK to bower-angular.git#1.2.x
bower not-cached    HTTPS_LINK to bower-angular-loader.git#1.2.x
bower resolve       HTTPS_LINK to bower-angular-loader.git#1.2.x
bower not-cached    HTTPS_LINK to bower-angular-route.git#1.2.x
bower resolve       HTTPS_LINK to bower-angular-route.git#1.2.x
bower not-cached    HTTPS_LINK to html5-boilerplate.git#~4.3.0
bower resolve       HTTPS_LINK to html5-boilerplate.git#~4.3.0
bower not-cached    HTTPS_LINK to bower-angular-mocks.git#~1.2.x
bower resolve       HTTPS_LINK to bower-angular-mocks.git#~1.2.x
bower ECMDERR       Failed to execute "git ls-remote --tags --heads https://gith
ub.com/angular/bower-angular-mocks.git", exit code of #128

Additional error details:
fatal: unable to access '**https://**github.com/angular/bower-angular-mocks.git/': F
ailed connect to github.com:443; No error

From a log I can see that bower is using HTTPS instead of GIT. And another update is that I am able to execute the failed command on GIT.

git ls-remote --tags --heads HTTPS_LINK
like image 383
Satish Avatar asked Dec 07 '22 00:12

Satish


2 Answers

I was having a similar issues where bower failed to get angular-animate. I was able to resolve this issue by running

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

Make sure you navigate to your App project folder and run that to see if that would resolve your issues

like image 184
JayKan Avatar answered Dec 08 '22 14:12

JayKan


If it is a new project type git init in order to create a git repository in your project directory, then try this

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

This configuration will only affect local project

Then try bower commands

If you want a global solution try this

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

A deeper explanation in this url: http://jgoodall.me/posts/2013/05/29/git-use-https/

like image 41
Mario Avatar answered Dec 08 '22 12:12

Mario