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

后端 未结 24 1440
长情又很酷
长情又很酷 2020-11-30 21:42

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:

相关标签:
24条回答
  • 2020-11-30 22:23

    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.

    0 讨论(0)
  • 2020-11-30 22:23

    It appears as though azsl1326 failed to use bower (git) over port 9418 (git://), then told git to use port 22 (https://) instead. This was still failing, but then opening port 22 got the desired result.

    The most direct solution is to open port 9418. This is the port that the git:// protocol uses.

    0 讨论(0)
  • 2020-11-30 22:23

    Check your git config settings (git config --global --edit). In my case there were a couple of no longer valid entries like:

    [core]
    gitproxy=gitproxy.cmd
    ["https://"]
    ["https://"]
    [url "https://"]

    Revise them and remove if you don't need them anymore.

    0 讨论(0)
  • 2020-11-30 22:24

    If your country block github, e.g. China mainland, then you can build a proxy, e.g. use goagent & gae, then set proxy address for git, e.g.

    git config --global http.proxy 127.0.0.1:8087
    
    0 讨论(0)
  • 2020-11-30 22:26

    Are you behind a firewall?

    Git doesn't pick up the proxy configuration when it's called, so set environment variables explicitly, e.g.:

    export HTTP_PROXY=http://username:password@proxyserver:port/
    export HTTPS_PROXY=http://username:password@proxyserver:port/
    

    If your corporate proxy doesn't need authentication just omit the username:password@ bit in the URLs.

    It worked for me!

    0 讨论(0)
  • 2020-11-30 22:29

    Navigate to your Application Folder and run this command

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

    "

    This should fix your issue

    0 讨论(0)
提交回复
热议问题