Git did not exit cleanly exit code 128 как исправить

Here is a little bit background: I run Win7 I have private git repo and installed Github for Windows I didn't like the Github for Windows client (lack capabilities). I installed TortoiseGit for Wi...

Generic answer

Every time git.exe is executed it returns an exit code (cf. Does git return specific return error codes?).

An exit code of 0 indicates success.

In the StackOverflow post the exit code 128 is mentioned, which indicates an error:

The (exit code 128) is some kind of «unexpected error» (cf. https://stackoverflow.com/a/8059956/3906760).
What it means is highly dependant on the git command executed and the output it issued. Therefore, there can’t be a single easy and short answer on how to solve this.

The following post contains a specific answer which is related to the push case and at the end a more generic answer (If this doesn’t help section).


Answer for the case of the initial Stackoverflow post

The following answer is based on the fact, that git.exe was executed to run a push.

Using TortoiseGit with SSH

Here one needs to differentiate between OpenSSH and PuTTY. (See here)

OpenSSH

In order to use OpenSSH you have to set ssh.exe as «SSH client» on TortoiseGit settings -> Network.
OpenSSH uses %HOME%/.ssh/id_rsa(.pub) files for their public/private keys by default, which must be created by OpenSSH ssh-keygen and not PuTTYGen (PuTTY keys have a different format, however, can also be converted using PuTTYGen).
If %HOME% is not set, TortoiseGit will set it automatically, if you manually set %HOME% please make sure it is valid (you might have to use slashes instead of backslashes).

This is recommended for people who already have their OpenSSH keys.

PuTTY

PuTTY, which is to be preferred on Windows, requires that public/private keys are created using PuTTYGen (which is shipped with TortoiseGit).
TortoiseGitPlink.exe needs to be selected as ssh client on TortoiseGit settings -> Network — that should be the default. However, there is no default place for the public/private keys and, thus, these have to be configured. There are (at least two ways to do that):

  1. Configure your key to be the default key in PuTTY based applications.
    For this, open PuTTY (which is not shipped with TortoiseGit and has to be downloaded separately). Then go to the Connection-> SSH -> Auth configuration page and select your .ppk file as «Private key for authentication», go back to the «Session» configuration page, select «Default Settings» there and hit save. -> From now on PuTTY and PLink will use this key for authentication.

  2. In order to make TortoiseGit load a private key for using with PuTTY one has to configure it.

    • For an existing repository: Choose a repository, open TortoiseGit settings -> Remote and select your remote repository configuration there (normally «origin»). Then select your private .ppk key and hit «Add new/Save».
    • For a new repository the key can be selected while cloning. When pushing/pulling make sure «Autoload putty key» is checked.

More tips/tricks for using PuTTY.


If this doesn’t help

First of all we need to make sure that the right git.exe is called — normally that should be the case as TortoiseGit tries hard to find the correct git.exe on the system on first start-up. This can be easily done by going to the TortoiseGit settings -> General. There one should check whether «git.exe Path» points to the right folder of «Git for Windows» (in must point to the bin folder of the Git for Windows installation, not the cmd folder — but this should happen automatically) — if msysgit (the development version of «Git for Windows») is used, it is necessary that the [MSYSGIT-INSTALL-PATH]mingwbin-folder is on the path (i.e. entered in the Extern DLL Path textbox) in order to execute git.exe (otherwise required .dll-files) cannot be found. (See TortoiseGit docs)

Now click on «Check now» and check that the right version number appears next to the button (not no error message).
If this is working, git.exe should be configured correctly and work with https.

I’ve run into this serious error while committing, and created a bug report.

I keep getting this error on TortoiseGit operations:

git did not exit cleanly (exit code 128)

I’ve reinstalled the program, rebooted, and tried to clone a fresh repo from github — nothing seems to work. I also deleted %appdata%Tortoise git folder … I’m at a loss now. Any advice on how to proceed?

MrTux's user avatar

MrTux

31.6k30 gold badges113 silver badges144 bronze badges

asked Mar 8, 2012 at 12:01

ripper234's user avatar

ripper234ripper234

218k269 gold badges626 silver badges899 bronze badges

10

It’s probably because your SSH key has been removed/revoked. Make a new one and add it to your GitHub account.

dimo414's user avatar

dimo414

46.2k18 gold badges147 silver badges236 bronze badges

answered Apr 2, 2012 at 16:50

gaz's user avatar

4

for me I simply had to add configure my git username and email with the following commands:

git config --global user.email "you@example.com"
git config --global user.name "Your Name"

answered Jun 21, 2013 at 5:38

Benjamin Kaiser's user avatar

4

If you’re running windows 7:

I was trying to decide the best way to do this securely, but the lazy way is :

  1. right-click the parent folder
  2. click the «properties» button
  3. click the «security» tab
  4. click the «edit» button
  5. click the group that starts with «Users»
  6. click the checkbox that says «full control»
  7. click all the OK’s to close the dialogs.

I realize this might circumvent windows «security» features, but it gets the job done.

Alicia's user avatar

Alicia

1,1521 gold badge25 silver badges41 bronze badges

answered Mar 9, 2012 at 15:58

user416456's user avatar

1

git-bash reports
fatal: Unable to create <Path to git repo>/.git/index.lock: File exists.

Deleting index.lock makes the error go away.

sandip's user avatar

sandip

5239 silver badges26 bronze badges

answered Jan 25, 2013 at 18:22

dezirus's user avatar

dezirusdezirus

1191 silver badge2 bronze badges

1

In my case a folder in my directory named as the git-repository on the server caused the failure.

answered Oct 23, 2012 at 12:48

Benny's user avatar

BennyBenny

1091 silver badge6 bronze badges

1

Deleting index.lock worked for me

answered Nov 22, 2013 at 18:34

m0r6aN's user avatar

m0r6aNm0r6aN

82011 silver badges19 bronze badges

1

on win7 64:

git-gui gives a good answer: a previous git has crashed and left a lock file. Manually remove.
In my case, this was in .git/ref/heads/branchname.lock.

delete, and error 128 goes away. It surprises that tortoisegit doesn’t give such an easy explanation.

answered Jan 6, 2013 at 12:10

opto's user avatar

In my case, it was because of the proxy. A proxy was needed in the corporate network and TortoiseGit / Git does not seems to automatically get information from Windows internet settings. Setting up the proxy address solved the issue.

answered Nov 12, 2013 at 15:13

Cesar's user avatar

CesarCesar

2,03724 silver badges30 bronze badges

For me, I tried to check out a SVN-project with TortoiseGit. It worked fine if I used TortoiseSVN though. (May seem obvious, but newcomers may stumble on this one)

answered Dec 2, 2012 at 7:32

Erik Bergstedt's user avatar

In my case, I forgot to add git to the respository name at the end.

answered Mar 20, 2013 at 13:45

Manasi Diwan's user avatar

I did git revert a multiple times ,and it worked for me make sure un-check the files while reverting you need changes. Stash your changes and pull again.

answered Apr 22, 2013 at 21:37

user2062360's user avatar

user2062360user2062360

1,2334 gold badges16 silver badges28 bronze badges

I was having this same issue and I resolved it in the following way…

I have the NVIDIA «Tegra Android Development Pack» installed and it seems to also have a version of mysysgit.exe with it. TortoiseGit automatically found that installation location (instead of the standard git installation) and auto-populated it in the settings menu.

To correct this, go to: «Settings -> General» and there is a field for the path to mysysgit.exe. Make sure this is pointing to the correct installation.

answered Sep 5, 2013 at 14:18

roadrunner's user avatar

An quick solution would be to create a new local directory for example c:git_2014, In this directory rightklick and choose Git Clone

answered Jan 7, 2014 at 8:26

Roel van Roozendaal's user avatar

make sure the username and email fields are not empty in the config file. and try to clone to an empty directory. these steps worked for me.

answered Aug 15, 2013 at 9:54

sajin tm's user avatar

sajin tmsajin tm

3233 silver badges8 bronze badges

although, it is a very old thread, recently I got this error, and in my case, the link was broken. When the link to GitHub was fixed, it worked.

answered Dec 8, 2022 at 1:30

uSer's user avatar

uSeruSer

236 bronze badges

1

What has worked for me:
Removing all offending branch related files from all folders in .gitref and .gitlogs

answered Jan 20 at 13:08

fatherOfWine's user avatar

fatherOfWinefatherOfWine

1,17116 silver badges38 bronze badges

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:

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 have 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 nor do any of the other solutions found on that page. Searching for a solution for the 2nd error, it seems that setting a username/pwd for a proxy server will resolve the issue if you are on a corporate network/behind a firewall. However, I am not using a proxy server as I am on my home pc/network (windows 7 x64).

Thanks!

EDIT: Command window with errors:

enter image description here

asked Feb 4, 2014 at 5:42

azsl1326's user avatar

azsl1326azsl1326

1,4102 gold badges13 silver badges23 bronze badges

2

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.

isherwood's user avatar

isherwood

56.5k16 gold badges109 silver badges151 bronze badges

answered Apr 15, 2014 at 14:55

ablais's user avatar

ablaisablais

1,4261 gold badge10 silver badges12 bronze badges

8

Instead to run this 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 make git always use https in this way:

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

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

answered Feb 6, 2014 at 8:35

antonjs's user avatar

antonjsantonjs

13.8k12 gold badges62 silver badges91 bronze badges

1

I came across this with my corporate network.

It seemed strange because I’ve always been using ssh to connect with git and never had an issue.

I tried https and didn’t work so I added proxy settings to git’s config and all was well

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

answered Aug 12, 2014 at 1:11

Frank Fu's user avatar

Frank FuFrank Fu

3,3432 gold badges27 silver badges37 bronze badges

3

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.

answered Feb 8, 2014 at 4:02

azsl1326's user avatar

azsl1326azsl1326

1,4102 gold badges13 silver badges23 bronze badges

1

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.

answered Mar 24, 2014 at 1:01

Henry's user avatar

HenryHenry

7,6112 gold badges38 silver badges38 bronze badges

3

Navigate to your Application Folder and run this command

git config —global url.»https://».insteadOf «git://

«

This should fix your issue

answered Mar 18, 2015 at 7:39

Ignatius Andrew's user avatar

Ignatius AndrewIgnatius Andrew

7,8223 gold badges53 silver badges54 bronze badges

Perhaps you need to generate an ssh key so you are authenticated with github.

answered Feb 5, 2014 at 2:58

Kit's user avatar

KitKit

3,3181 gold badge26 silver badges24 bronze badges

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!

answered Nov 5, 2014 at 13:10

Steve Neal's user avatar

Steve NealSteve Neal

7263 gold badges8 silver badges16 bronze badges

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

answered Jan 28, 2016 at 10:08

Dahar Youssef's user avatar

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.

answered Jun 1, 2014 at 8:04

TwystO's user avatar

TwystOTwystO

2,3261 gold badge20 silver badges28 bronze badges

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.

Community's user avatar

answered Dec 15, 2016 at 11:44

rentire's user avatar

Am adding my answer here as this is one of the closest questions that matched my situation. Was trying to install select2 rather than bootstrap, but the outcome was the same.

bower install select2 reported that git was unable to locate the directory. Used the

git config —global url.»https://».insteadOf git://

config fix, but that resulted in a (paraphrased) error

I can’t use https

My issue was resolved unsatisfactorily, as it involves magic.

I was attempting to run this in a command shell (cmd.exe, windows). I ran the same command and ran it in powershell and it worked. ಠ_ಠ

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

answered Oct 24, 2014 at 14:50

I got this error after my virus checker had quarantined a download from github.com. For some unknown reason.

After I cleared those files (exe files) everything worked.

answered Oct 27, 2014 at 17:42

Gervase's user avatar

GervaseGervase

1,02010 silver badges15 bronze badges

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

was not working for me. So I found this alternative:

Go to your temp folder. ( i.e. if you are using windows then C:Users{username}AppDataRoamingbowercachepackages ). There you can see several files. Open each of them and you can see the URL. Change it from git://... to https://... and save all files.

Now run the bower install.

Mansuro's user avatar

Mansuro

4,4884 gold badges34 silver badges74 bronze badges

answered Dec 31, 2014 at 10:22

avadhesh pareek's user avatar

1

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.

answered Jan 21, 2015 at 13:35

user3805793's user avatar

Your keys are wrong. Just add them to GitHub/Bitbucket/whatever you are using. It’s nothing more than a permission issue with your keys.

answered Mar 5, 2015 at 20:15

kaiser's user avatar

kaiserkaiser

21.5k16 gold badges87 silver badges109 bronze badges

However, I am not using a proxy server as I am on my home pc/network

Had the same problem (getting exit code 128) on my home network and was quite sure i was not using a proxy. Turns out, Git had saved a proxy i had entered some time in the past — after looking around in the configs, i found it under the [http] tag.

I’m new to Git, and i’m not at all sure, if those configs are usually easily accessible — am using Tortoise Git, since i’m not doing anything fancy really and that has a GUI for the things.

Hope the «answer» helps nonetheless.

answered Mar 31, 2015 at 20:31

flailgull's user avatar

In my case was the folder access where i was during the command execution!
On windows I created the folder first by command line: mkdir «MyFolder» and I had the error.
but if I create the folder with the mouse, right click, create folder etc.
Works fine!

answered Feb 28, 2016 at 21:06

Matteo Tosato's user avatar

If you are authenticating with bitbucket, where I’m getting error 128 & Failed connect. but when using authenticating git hub its working fine.

answered Jun 12, 2016 at 6:24

Narayana's user avatar

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

Sometimes(If you are in an office or private network) your gateway server firewall block the https requests(port 443) from the command terminal

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

Use this to config the git to use http over https for those situvations

answered Jul 14, 2016 at 11:56

Stenal P Jolly's user avatar

This worked for me,

Copy the file «libcurl.dll» in Git installation folder ( C:Program FilesGitbinlibcurl.dll ). Paste it in location where the git.exe exists ( C:Program FilesGitlibexecgit-core ).

answered Oct 29, 2016 at 6:25

Shashank Gupta's user avatar

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)

Fruchtzwerg's user avatar

Fruchtzwerg

10.6k12 gold badges41 silver badges48 bronze badges

answered Feb 3, 2017 at 17:45

Vikas Verma's user avatar

I ran into this error too, and resolved by updating git. When I ran the failed git ls-remote command, the underlying error was that an old tls version was being used. So updated version of git uses later version of tls.

https://git-scm.com/download/win

answered Feb 23, 2018 at 21:36

JohnnyFun's user avatar

JohnnyFunJohnnyFun

3,7952 gold badges19 silver badges20 bronze badges

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)

answered May 16, 2018 at 7:52

alking's user avatar

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:

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 have 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 nor do any of the other solutions found on that page. Searching for a solution for the 2nd error, it seems that setting a username/pwd for a proxy server will resolve the issue if you are on a corporate network/behind a firewall. However, I am not using a proxy server as I am on my home pc/network (windows 7 x64).

Thanks!

EDIT: Command window with errors:

enter image description here

asked Feb 4, 2014 at 5:42

azsl1326's user avatar

azsl1326azsl1326

1,4102 gold badges13 silver badges23 bronze badges

2

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.

isherwood's user avatar

isherwood

56.5k16 gold badges109 silver badges151 bronze badges

answered Apr 15, 2014 at 14:55

ablais's user avatar

ablaisablais

1,4261 gold badge10 silver badges12 bronze badges

8

Instead to run this 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 make git always use https in this way:

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

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

answered Feb 6, 2014 at 8:35

antonjs's user avatar

antonjsantonjs

13.8k12 gold badges62 silver badges91 bronze badges

1

I came across this with my corporate network.

It seemed strange because I’ve always been using ssh to connect with git and never had an issue.

I tried https and didn’t work so I added proxy settings to git’s config and all was well

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

answered Aug 12, 2014 at 1:11

Frank Fu's user avatar

Frank FuFrank Fu

3,3432 gold badges27 silver badges37 bronze badges

3

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.

answered Feb 8, 2014 at 4:02

azsl1326's user avatar

azsl1326azsl1326

1,4102 gold badges13 silver badges23 bronze badges

1

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.

answered Mar 24, 2014 at 1:01

Henry's user avatar

HenryHenry

7,6112 gold badges38 silver badges38 bronze badges

3

Navigate to your Application Folder and run this command

git config —global url.»https://».insteadOf «git://

«

This should fix your issue

answered Mar 18, 2015 at 7:39

Ignatius Andrew's user avatar

Ignatius AndrewIgnatius Andrew

7,8223 gold badges53 silver badges54 bronze badges

Perhaps you need to generate an ssh key so you are authenticated with github.

answered Feb 5, 2014 at 2:58

Kit's user avatar

KitKit

3,3181 gold badge26 silver badges24 bronze badges

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!

answered Nov 5, 2014 at 13:10

Steve Neal's user avatar

Steve NealSteve Neal

7263 gold badges8 silver badges16 bronze badges

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

answered Jan 28, 2016 at 10:08

Dahar Youssef's user avatar

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.

answered Jun 1, 2014 at 8:04

TwystO's user avatar

TwystOTwystO

2,3261 gold badge20 silver badges28 bronze badges

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.

Community's user avatar

answered Dec 15, 2016 at 11:44

rentire's user avatar

Am adding my answer here as this is one of the closest questions that matched my situation. Was trying to install select2 rather than bootstrap, but the outcome was the same.

bower install select2 reported that git was unable to locate the directory. Used the

git config —global url.»https://».insteadOf git://

config fix, but that resulted in a (paraphrased) error

I can’t use https

My issue was resolved unsatisfactorily, as it involves magic.

I was attempting to run this in a command shell (cmd.exe, windows). I ran the same command and ran it in powershell and it worked. ಠ_ಠ

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

answered Oct 24, 2014 at 14:50

I got this error after my virus checker had quarantined a download from github.com. For some unknown reason.

After I cleared those files (exe files) everything worked.

answered Oct 27, 2014 at 17:42

Gervase's user avatar

GervaseGervase

1,02010 silver badges15 bronze badges

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

was not working for me. So I found this alternative:

Go to your temp folder. ( i.e. if you are using windows then C:Users{username}AppDataRoamingbowercachepackages ). There you can see several files. Open each of them and you can see the URL. Change it from git://... to https://... and save all files.

Now run the bower install.

Mansuro's user avatar

Mansuro

4,4884 gold badges34 silver badges74 bronze badges

answered Dec 31, 2014 at 10:22

avadhesh pareek's user avatar

1

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.

answered Jan 21, 2015 at 13:35

user3805793's user avatar

Your keys are wrong. Just add them to GitHub/Bitbucket/whatever you are using. It’s nothing more than a permission issue with your keys.

answered Mar 5, 2015 at 20:15

kaiser's user avatar

kaiserkaiser

21.5k16 gold badges87 silver badges109 bronze badges

However, I am not using a proxy server as I am on my home pc/network

Had the same problem (getting exit code 128) on my home network and was quite sure i was not using a proxy. Turns out, Git had saved a proxy i had entered some time in the past — after looking around in the configs, i found it under the [http] tag.

I’m new to Git, and i’m not at all sure, if those configs are usually easily accessible — am using Tortoise Git, since i’m not doing anything fancy really and that has a GUI for the things.

Hope the «answer» helps nonetheless.

answered Mar 31, 2015 at 20:31

flailgull's user avatar

In my case was the folder access where i was during the command execution!
On windows I created the folder first by command line: mkdir «MyFolder» and I had the error.
but if I create the folder with the mouse, right click, create folder etc.
Works fine!

answered Feb 28, 2016 at 21:06

Matteo Tosato's user avatar

If you are authenticating with bitbucket, where I’m getting error 128 & Failed connect. but when using authenticating git hub its working fine.

answered Jun 12, 2016 at 6:24

Narayana's user avatar

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

Sometimes(If you are in an office or private network) your gateway server firewall block the https requests(port 443) from the command terminal

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

Use this to config the git to use http over https for those situvations

answered Jul 14, 2016 at 11:56

Stenal P Jolly's user avatar

This worked for me,

Copy the file «libcurl.dll» in Git installation folder ( C:Program FilesGitbinlibcurl.dll ). Paste it in location where the git.exe exists ( C:Program FilesGitlibexecgit-core ).

answered Oct 29, 2016 at 6:25

Shashank Gupta's user avatar

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)

Fruchtzwerg's user avatar

Fruchtzwerg

10.6k12 gold badges41 silver badges48 bronze badges

answered Feb 3, 2017 at 17:45

Vikas Verma's user avatar

I ran into this error too, and resolved by updating git. When I ran the failed git ls-remote command, the underlying error was that an old tls version was being used. So updated version of git uses later version of tls.

https://git-scm.com/download/win

answered Feb 23, 2018 at 21:36

JohnnyFun's user avatar

JohnnyFunJohnnyFun

3,7952 gold badges19 silver badges20 bronze badges

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)

answered May 16, 2018 at 7:52

alking's user avatar

Понравилась статья? Поделить с друзьями:

Читайте также:

  • Git clone ошибка
  • Git clone fatal protocol error bad line length character
  • Git clone error invalid path
  • Git clone error filename too long
  • Git clone certificate error

  • 0 0 голоса
    Рейтинг статьи
    Подписаться
    Уведомить о
    guest

    0 комментариев
    Старые
    Новые Популярные
    Межтекстовые Отзывы
    Посмотреть все комментарии