可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试):
问题:
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 5 years ago.
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 :
- right-click the parent folder
- click the "properties" button
- click the "security" tab
- click the "edit" button
- click the group that starts with "Users"
- click the checkbox that says "full control"
- 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.