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

帅比萌擦擦* 提交于 2019-12-02 00:37:34

问题


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

回答1:


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




回答2:


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/




回答3:


I have had this issue and deleting C:\user\AppData\Roaming\bower\cache clears it up for me




回答4:


Running the "bower install" in git bash, cleaning the C:\Users\\AppData\Local\bower, run "git config --global url."https://".insteadOf git://" then "bower cache clean". Finally "bower install" all in Giy Bash.



来源:https://stackoverflow.com/questions/25891884/bower-install-error-unable-to-connect-exit-code-of-128

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!