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

I use Bower to install multiple libraries. For demonstration, here I am installing bootstrap. Regardless of the package, I get 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 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 and does not implement any other solutions found on this page. Looking for a solution for the 2nd error, it seems that setting the username / pwd for the proxy server will solve the problem if you are on the corporate network / behind a firewall. However, I do not use a proxy server, as I am on my home PC / network (Windows 7 x64).

Thank!

EDIT: command window with errors:

enter image description here

+83
git bower
Feb 04
source share
22 answers

Port 22 is blocked on my computer. As soon as I found that I blocked it and opened the port, I was able to run the cmd collector without any problems.

+7
Feb 08 '14 at 4:02
source share

I know this is not a β€œfix” for the problem, but you can use

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

tell git to use HTTPS instead of git, which developed my installation of npm dependencies.

+121
Apr 15 '14 at
source share

Instead, run the following command:

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

you should run this command:

  git ls-remote --tags --heads git@github.com: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 do git always use https like this:

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

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

+33
Feb 06 '14 at 8:35
source share

I came across this with my corporate network.

It seemed strange to me because I always used ssh to communicate with git and never had a problem.

I tried https and did not work, so I added proxy settings to git config and everything was fine

 git config --global http.proxy http://proxyuser:proxypwd@proxy.server.com:8080 git config --global https.proxy https://proxyuser:proxypwd@proxy.server.com:8080 

And making sure it worked

 git config --list 
+18
Aug 12 '14 at 1:11
source share

It seems that azsl1326 did not use bower (git) on port 9418 (git: //), and then told git to use port 22 (https: //). This still failed, but then the opening of port 22 got the desired result.

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

+5
Mar 24 '14 at 1:01
source share

Go to your application folder and run this command

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

"

This should fix your problem.

+3
Mar 18 '15 at 7:39
source share

You may need to generate the ssh key so that you are authenticated with github.

+2
05 Feb '14 at 2:58
source share

This error is due to the poor configuration of your firewall. You will notice that the other person is trying to contact git through the git:// protocol, not http:// . You must open port 9418 . Add two lines to the iptables configuration:

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

That should do the trick.

+2
Jun 01 '14 at 8:04
source share

Are you behind a firewall?

Git does not display the proxy configuration when it is called, so explicitly set environment variables, for example:

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

If your corporate proxy does not need authentication, just omit the username:password@ bit in the URLs.

It worked for me!

+2
Nov 05 '14 at 13:10
source share

If your village github block, for example. Chinese mainland, then you can create a proxy server, for example. use goagent and gae, then set the proxy address for git, for example.

 git config --global http.proxy 127.0.0.1:8087 
+2
Jan 28 '16 at 10:08
source share

First, you should check if the Visual Studio command recognizes the git command: Tools> Command Prompt

C: \ .... \> git

if this command is not recognized, you must add the git folder to your environment variables

stack overflow

This is what I was missing and helped.

Hope this helps.

+1
Dec 15 '16 at 11:44
source share

I am adding my answer here, as this is one of the closest questions that fit my situation. I tried to install select2, not bootstrap, but the result was the same.

bower install select2 reported that git could not find the directory. Is used

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

config fix, but this led to a (rephrased) error

I can not use https

My problem was unsatisfactorily resolved, since it involves magic.

I tried to run this in a shell (cmd.exe, windows). I ran the same command and ran it in powershell and it worked. ΰ² _ΰ² 

tl; dr: a combination of https: // and powershell worked for me

0
24 Oct. '14 at 14:50
source share

I got this error after my antivirus program quarantined the download from github.com. For an unknown reason.

After cleaning these files (exe files) everything worked.

0
Oct 27 '14 at 5:42 on
source share
 git config --global url. "https://".insteadOf "git://" 

didn't work for me. So I found this alternative:

Go to the temp folder. (i.e. if you use windows, then C:\Users\{username}\AppData\Roaming\bower\cache\packages ). There you can see several files. Open each one and you will see the url. Change it from git://... to https://... and save all the files.

Now run bower install .

0
Dec 31 '15 at 10:22
source share

Check your git configuration settings ( git config --global --edit ). In my case, there were a couple of more invalid entries like:

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

Review them and delete if you no longer need them.

0
Jan 21 '15 at 13:35
source share

Your keys are wrong. Just add them to github / bitbucket / whatever you use. This is nothing more than a problem with your keys.

0
Mar 05 '15 at 20:15
source share

However, I do not use a proxy server, as I am on my home computer / network

Had the same problem (getting exit code 128) on my home network and was pretty sure that I did not use a proxy. It turns out that Git saved the proxy server, which I used to log in for some time in the past - after looking in the configs I found it under the tag [http].

I'm new to Git, and I'm not at all sure if these configs are usually easily accessible - I use Tortoise Git since I am not doing anything and I have a GUI for things.

Hope that the β€œanswer” nonetheless helps.

0
Mar 31 '15 at 20:31
source share

In my case, I had access to the folder where I was at the time of the command! On Windows, I created the folder first on the command line: mkdir "MyFolder", and I had an error. but if I create the folder with the mouse, right click, create the folder, etc. Works great!

0
Feb 28 '16 at 21:06
source share

If you are authenticating with bitbucket, where I get error 128 and Failed connect. but when using git authentication, the hub is working fine.

0
Jun 12 '16 at 6:24
source share

I know this is an old question, anyway let me add one more thing.

Sometimes (if you are working in an office or on a private network), the gateway server firewall blocks https requests (port 443) from the command line

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

Use this to configure git to use http over https for these situations

0
Jul 14 '16 at 11:56
source share

It worked for me

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

0
Oct 29 '16 at 6:25
source share

Run these 2 commands to give git access through your system

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

These commands assume that you have an ssh key on the remote git server (bitpack / github / other)

0
Feb 03 '17 at 17:45
source share



All Articles