How to resolve “git did not exit cleanly (exit code 128)” error on TortoiseGit? [closed]

社会主义新天地 提交于 2019-11-26 04:46:34

问题


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?


回答1:


It's probably because your SSH key has been compromised. Make a new one and add it to your GitHub account.




回答2:


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"



回答3:


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

Deleting index.lock makes the error go away.




回答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.




回答5:


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




回答6:


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.




回答7:


Deleting index.lock worked for me




回答8:


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.




回答9:


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)




回答10:


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




回答11:


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.




回答12:


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.




回答13:


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




回答14:


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.



来源:https://stackoverflow.com/questions/9617336/how-to-resolve-git-did-not-exit-cleanly-exit-code-128-error-on-tortoisegit

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