Description
Setup
- Which version of Git for Windows are you using? 32-bit or 64-bit? Include the
output ofgit version
as well.
git version 2.8.3.windows.1 64bit
$ git --version
git version 2.8.3.windows.1
-
Which version of Windows are you running? 32-bit or 64-bit?
Windows 10 Enterprise 64-bit
-
What options did you set as part of the installation? Or did you choose the
defaults?git config --global credential.helper store
-
Any other interesting things about your environment that might be related
to the issue you're seeing?
Nothing
Details
-
Which terminal/shell are you running Git from? e.g Bash/CMD/PowerShell/other
CMD
-
What commands did you run to trigger this issue? If you can provide a
Minimal, Complete, and Verifiable example
this will help us understand the issue.
All below:
git pull
git fetch --all
git push
-
What did you expect to occur after running these commands?
Do not issue an error message
-
What actually happened instead?
File ‘ .git-credentials.lock’ not exist:
This application has requested the Runtime to terminate it in an unusual way.
Please contact the application's support team for more information.
Assertion failed!
Program: \PortableGit2\mingw64\libexec\git-core\git-credential-store.exe
File:exec_cmd.c,Line23
Expression:argv0_path
File ‘ .git-credentials.lock’ exist:
fatal: unable to get credential storage lock: File exists
File '.git-credentials.lock' can not be removed when the command is finish.
-
If the problem was occurring with a specific repository, can you provide the
URL to that repository to help us with testing?Sorry, repository is private company repository.
Activity
jnsn commentedon May 24, 2016
I am experiencing the same issue:
dscho commentedon May 24, 2016
I am not a fan of bug reports that simply delete the carefully-crafted issue reporting template, and then go on and make it hard for me by not providing anything resembling a Minimal, Complete & Verifiable Example.
It's almost as if you wanted to make my life miserable.
jnsn commentedon May 24, 2016
I had git 2.8.2 installed, and updated to git 2.8.3 using your installer. I'm running Windows 10 Pro, 64 bit.
cd /c/Projects/MySuperCoolRepository
git pull origin
Then the aforementioned error occurs.
warmwinter commentedon May 25, 2016
@dscho I update my issue.
Is that right?
dscho commentedon May 25, 2016
Is the crucial bit the credential store? If so, why did you not include it in the MCVE? I guess it is rather important. As it is, I spent all the time that I can afford this week on this ticket, to get only this far. Frustrating.
svermeulen commentedon May 26, 2016
I encountered this same issue following the same steps as @jnsn . Downgrading back to 2.8.2 solves it for me though
dscho commentedon May 27, 2016
@svermeulen Could you please provide an MCVE that I can really verify here?
jnsn commentedon May 27, 2016
@dscho, the problem is indeed related to the
store
credential storage.As you can see, even though it throws an assertion error, the repository is successfully cloned. The error occurs with any other command which requires authenticating to the remote repository.
When using the
wincred
credential storage the assertion error message is not shown.dscho commentedon May 27, 2016
Note that the default helper is now Git Credential Manager. This example also overwrites any configuration, which is not good.
It would have been nice to specify one. As it happens, you can abuse GitHub for this, by pretending to clone a private repository. Take e.g. https://github.com/git/its-a-secret.
However, I cannot reproduce the problem. For me, even if I configure things as you said, the Git Credential Manager pops up and it does not show an Assertion.
I guess there is still a missing puzzle piece.
jnsn commentedon May 27, 2016
The
store
helper was already configured from way before the Git Credential Manager was part of the installation package. I can change for future use, that's not a problem.I can see in my $HOME folder that there's a
.git-credentials
and a.git-credentials.lock
file. I removed them both and I also removed a.git-credentials
file from myC:\Users\jnsn\
folder.I also removed the GitHub credentials from the Windows Credential Manager.
Since I only have access to my company's private repositories, I can't link them. However, I was able to reproduce the issue with a public repository, which requires authentication when pushing.
The next bit is interesting. At this point, if I check my Git config, I can see that the credential helper shows up twice:
I did a search on my system and found that there's a
.gitconfig
file located inC:\Program Files\Git\mingw64\etc\gitconfig
which contains the following:I don't know if that file is a remnant of an old installation, or something that gets shipped with every installation.
I continue with my operation:
Interestingly, since both credential helpers are specified, I first get the default Windows UI prompting for my GitHub credentials, next I have to fill in my username at the command line and I get the old Git password prompt dialog. When entering my credentials, the error message is shown, but the push continues.
fourpastmidnight commentedon May 28, 2016
@jnsn: the
[credential] helper = manager
is for the new Git Credentials Manager for Windows integration that @dscho was talking about before and has been shipping as the default credential manager since Git for Windows 2.7.3.When you executed
git config --list
, it listed the system, global, and local configuration options. System configuration options are located in%ProgramFiles%\Git\mingw64\etc\gitconfig
, global options are in~/.gitconfig
and local are in<your repo directory>/.git/config
.It would appear that your system configuration is set to use the Git Credentials Manager for Windows--which is to be expected because that's what Git for Windows comes with and that what gets installed (again, since 2.7.3). But your global or local settings are set to use the old credential helper, and I suspect it's in your global settings since you just cloned the repository.
From the Git-Scm book:
This appears to have some resemblance to what's happening in your case--you have multiple helpers defined and it appears that they are being tried in turn.
A few outstanding questions in my mind are:
git push
operation?35 remaining items
credential-store: avoid assertion
credential-store: avoid assertion
credential-store: avoid assertion
credential-store: avoid assertion
credential-store: avoid assertion
credential-store: avoid assertion
credential-store: avoid assertion
jeremykid commentedon Jul 26, 2018
I remove the .git-credentials.lock file and it works