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

后端 未结 24 1438
长情又很酷
长情又很酷 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:05

    This error is related to a bad configuration of your firewall. You will notice that bower trying to contact git via the git:// protocol and not http://. You have to open port 9418. Add this two lines in your iptables configuration :

    iptables -t filter -A INPUT -p tcp --dport 9418 -j ACCEPT
    iptables -t filter -A OUTPUT -p tcp --dport 9418 -j ACCEPT
    

    This should do the trick.

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

    Run these 2 commands to grant git access via your system

    eval `ssh-agent`
    ssh-add ~/.ssh/id_rsa
    

    These commands are assuming that you have ssh key over the remote git server(bitbucket/github/other)

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

    i found this error on my linux os. and i solve this problem 1. open curl log export GIT_CURL_VERBOSE=1 2.clone git repo 3. find the log 4. i fix the problem by update nss and curl (yum update nss nss-util nspr curl)

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

    Firstly, you should check if Visual Studio Command prompt recognizes git command: Tools > Command Line

    C:\....\> git

    if this command is not recognized, you should add git folder into Environment Variables

    https://stackoverflow.com/a/26620861/3449657

    This is what I was missing and did the trick for me.

    Hope it helps.

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

    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.

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

    This worked for me,

    Copy the file "libcurl.dll" in Git installation folder ( C:\Program Files\Git\bin\libcurl.dll ). Paste it in location where the git.exe exists ( C:\Program Files\Git\libexec\git-core ).

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