Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Can't deal with lock file .git-credentials.lock when exec git push in v2.8.3 #766

Closed
1 task
warmwinter opened this issue May 24, 2016 · 22 comments
Closed
1 task

Comments

@warmwinter
Copy link

warmwinter commented May 24, 2016

  • I was not able to find an open
    or closed issue
    matching what I'm seeing

Setup

  • Which version of Git for Windows are you using? 32-bit or 64-bit? Include the
    output of git 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.

@jnsn
Copy link

jnsn commented May 24, 2016

I am experiencing the same issue:

Assertion failed!

Program: C:\Program Files\Git\mingw64\libexec\git-core\git-credential-store.exe
File: exec_cmd.c, Line 23

Expression: argv0_path

This application has requested the Runtime to terminate it in an unusual way.
Please contact the application's support team for more information.

@dscho
Copy link
Member

dscho commented 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
Copy link

jnsn commented 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.

$ git --version
git version 2.8.3.windows.1
  1. Open Git Bash
  2. Navigate to a Git repository, eg: cd /c/Projects/MySuperCoolRepository
  3. Update the git repository, or any command using previously stored credentials, eg: git pull origin

Then the aforementioned error occurs.

@warmwinter
Copy link
Author

@dscho I update my issue.
Is that right?

@dscho
Copy link
Member

dscho commented 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
Copy link

I encountered this same issue following the same steps as @jnsn . Downgrading back to 2.8.2 solves it for me though

@dscho
Copy link
Member

dscho commented May 27, 2016

@svermeulen Could you please provide an MCVE that I can really verify here?

@jnsn
Copy link

jnsn commented May 27, 2016

@dscho, the problem is indeed related to the store credential storage.

jnsn@notebook MINGW64 /d/tmp
$ git config --global credential.helper store

jnsn@notebook MINGW64 /d/tmp
$ git clone <any_repo_which_requires_authentication>
Cloning into '<repo_name>'...
Assertion failed!

Program: C:\Program Files\Git\mingw64\libexec\git-core\git-credential-store.exe
File: exec_cmd.c, Line 23

Expression: argv0_path

This application has requested the Runtime to terminate it in an unusual way.
Please contact the application's support team for more information.
remote: Counting objects: 4097, done.
remote: Total 4097 (delta 0), reused 0 (delta 0), pack-reused 4097
Receiving objects: 100% (4097/4097), 28.13 MiB | 5.46 MiB/s, done.
Resolving deltas: 100% (2508/2508), d

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
Copy link
Member

dscho commented May 27, 2016

git config --global credential.helper store

Note that the default helper is now Git Credential Manager. This example also overwrites any configuration, which is not good.

git clone <any_repo_which_requires_authentication>

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
Copy link

jnsn commented 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 my C:\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.

jnsn@notebook MINGW64 ~
$ cd /d/tmp/

jnsn@notebook MINGW64 /d/tmp
$ git clone https://github.com/jnsn/vimfiles
Cloning into 'vimfiles'...
remote: Counting objects: 213, done.
remote: Total 213 (delta 0), Receiving objects:  57reused 0 (delta 0), pack-reuse% (d 212
Receiving objects: 100% (213/213), 288.65 KiB | 214.00 KiB/s, done.
Resolving deltas: 100% (96/96), done.
Checking connectivity... done.

jnsn@notebook MINGW64 /d/tmp
$ cd vimfiles/

jnsn@notebook MINGW64 /d/tmp/vimfiles (master)
$ touch helloworld.md

jnsn@notebook MINGW64 /d/tmp/vimfiles (master)
$ git add .

jnsn@notebook MINGW64 /d/tmp/vimfiles (master)
$ git commit -m "Added hello world"
[master 45074a4] Added hello world
 1 file changed, 0 insertions(+), 0 deletions(-)
 create mode 100644 helloworld.md

The next bit is interesting. At this point, if I check my Git config, I can see that the credential helper shows up twice:

$ git config --list | grep credential.helper
credential.helper=manager
credential.helper=store

I did a search on my system and found that there's a .gitconfig file located in C:\Program Files\Git\mingw64\etc\gitconfig which contains the following:

[credential]
    helper = manager

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:

jnsn@notebook MINGW64 /d/tmp/vimfiles (master)
$ git push
Logon failed, use ctrl+c to cancel basic credential prompt.
Username for 'https://github.com/': jnsn
Assertion failed!

Program: C:\Program Files\Git\mingw64\libexec\git-core\git-credential-store.exe
File: exec_cmd.c, Line 23

Expression: argv0_path

This application has requested the Runtime to terminate it in an unusual way.
Please contact the application's support team for more information.
Counting objects: 3, done.
Delta compression using up to 8 threads.
Compressing objects: 100% (2/2), done.
Writing objects: 100% (3/3), 275 bytes | 0 bytes/s, done.
Total 3 (delta 1), reused 1 (delta 0)
To https://github.com/jnsn/vimfiles
   480ca72..45074a4  master -> master

jnsn@notebook MINGW64 /d/tmp/vimfiles (master)

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
Copy link

@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:

If there are multiple instances of the credential.helper configuration variable, each helper will be tried in turn, and may provide a username, password, or nothing. Once Git has acquired both a username and a password, no more helpers will be tried.

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:

  1. Which helper is providing the credentials for the git push operation?
  2. Why is the second helper being tried, if presumably, valid credentials are being provided to the first one?

@dscho
Copy link
Member

dscho commented May 28, 2016

FWIW this is an MCVE:

printf 'protocol=https\nhost=gitblub.com\nusername=hello\npassword=world\n' |
git credential-store store

dscho added a commit to dscho/git that referenced this issue May 28, 2016
<TODO>

This fixes git-for-windows#766

Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
@dscho
Copy link
Member

dscho commented Jun 8, 2016

@WhyEvenTry did you notice the commit mentioned earlier? If so, you can try it. The benefit would be that I know whether this fixes the bug and could make sure that the next Git for Windows release has the fix.

@dscho
Copy link
Member

dscho commented Jun 9, 2016

Which git version is it in?

In no released version yet. I require proof that the patch fixes the bug before I include it in any official release. I would consider any other course of action irresponsible.

If you could build Git from my credstore-assertion branch and verify that it fixes your problem, I will finish my work on that patch and include it in the next official Git for Windows version.

@jonnywilliamson
Copy link

jonnywilliamson commented Jun 17, 2016

@dscho

Hi.

I came across this issue this evening and found this bug report. So I went testing on a virtual machine to see if your branch fixed the issue. Good news is that it did.

I happened to have an old version of git for windows installed (v2.6.3) on my VM before I had even begun so I did a quick test with it.

I set git config credential.helper store and ran a clone request from a password protected repository. The .git-credentials file was created successfully with no errors:

Video 1: https://vimeo.com/171162542

Then I installed git for windows 2.9.0.

Using the same config settings for git, I tried to clone the same repo. This time I got the

Assertion failed!

Program: C:\Program Files\Git\mingw64\libexec\git-core\git-credential-store.exe
File: exec_cmd.c, Line 23

Expression: argv0_path

error.

Video 2: https://vimeo.com/171162543

Finally, I followed your instructions and built a version of git from your credstore-assertion branch. This showed a version of git around 2.8.3, but when I ran the commands again to clone - everything was successful.

I think the bug is fixed.

Video 3: https://vimeo.com/171162544

Thank you.

@dscho
Copy link
Member

dscho commented Jun 19, 2016

Thanks. In my mail client, I cannot watch the videos, of course (I could have read pasted text, though...)

The main issue I have with my patch is that it violates the DRY principle. Rather than copy the git_extract_argv0_path() into each and every main() function, it would be nicer to call it in one central place. The problem with that is that this function also serves another purpose: to extract the command name from a hard-linked builtin. Hmm.

@FeodorFitsner
Copy link

Hi guys,

can we expect this issue to be fixed in 2.9.1?

Thank you for your work!

@acoberlin
Copy link

Hi guys,

maybe this is related to this issue somehow:
We are using Jenkins to fetch and pull with git. Installed git 2.9.0 in 64-Bit Windows 2008 R2.
After polling git through jenkins in the apache temp folder there are git*.credentials.lock files left, that are not removed after use. Since Jenkins is polling git every 15 minutes for 100 Projects there are some requests that will hang and git-credential-manager.exe is stalled until the timeout of 10 minutes kills the process. Any idea why that is with the git-credential-manager.exe?

Since this is the second time I am reporting anything on github please have mercy with my brief description. Thank you for your work and efforts with git for Windows.

Kind regards,
Aleks

@dscho dscho closed this as completed in ac008b3 Jun 29, 2016
@dscho
Copy link
Member

dscho commented Jun 29, 2016

Oh well. I used the lousy work-around.

@lucysyt
Copy link

lucysyt commented Jul 6, 2016

fatal: unable to get credential storage lock: File exists
谁能帮助解决些这个问题?help?help?help?help?help?help?help?help?help?help?help?help?help?help?

@dscho
Copy link
Member

dscho commented Jul 6, 2016

This will be fixed in the next Git for Windows version. If you need it earlier, you may want to build an installer yourself. (Whenever time allows, which is not often, I am working towards a setup where intermediate installers will be built automatically, we are just not there yet, and please do not expect this to happen anytime soon.)

dscho added a commit that referenced this issue Jul 12, 2016
As of 1a9d15d (tempfile: a new module for handling temporary files,
2015-08-10), the temporary files which are used by the lock file
machinery adjust the permissions, and to do that, the config is read,
which in turn requires the config to be read.

This means that the runtime prefix needs to be resolved properly, but we
did not set that correctly in credential-store.

The symptom of this bug: when running

	printf '%s\n%s\n%s\n%s\n' \
		'protocol=https' 'host=gitblub.com' \
		'username=hello' 'password=world' |
	git credential-store store

an assertion is thrown:

	Assertion failed!

	Program: ...\libexec\git-core\git-credential-store.exe
	File: exec_cmd.c, Line 23

	Expression: argv0_path

	This application has requested the Runtime to terminate it in an
	unusual way.  Please contact the application's support team for
	more information.

This fixes #766

Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
dscho added a commit that referenced this issue Jul 27, 2016
As of 1a9d15d (tempfile: a new module for handling temporary files,
2015-08-10), the temporary files which are used by the lock file
machinery adjust the permissions, and to do that, the config is read,
which in turn requires the config to be read.

This means that the runtime prefix needs to be resolved properly, but we
did not set that correctly in credential-store.

The symptom of this bug: when running

	printf '%s\n%s\n%s\n%s\n' \
		'protocol=https' 'host=gitblub.com' \
		'username=hello' 'password=world' |
	git credential-store store

an assertion is thrown:

	Assertion failed!

	Program: ...\libexec\git-core\git-credential-store.exe
	File: exec_cmd.c, Line 23

	Expression: argv0_path

	This application has requested the Runtime to terminate it in an
	unusual way.  Please contact the application's support team for
	more information.

This fixes #766

Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
dscho added a commit that referenced this issue Jul 27, 2016
As of 1a9d15d (tempfile: a new module for handling temporary files,
2015-08-10), the temporary files which are used by the lock file
machinery adjust the permissions, and to do that, the config is read,
which in turn requires the config to be read.

This means that the runtime prefix needs to be resolved properly, but we
did not set that correctly in credential-store.

The symptom of this bug: when running

	printf '%s\n%s\n%s\n%s\n' \
		'protocol=https' 'host=gitblub.com' \
		'username=hello' 'password=world' |
	git credential-store store

an assertion is thrown:

	Assertion failed!

	Program: ...\libexec\git-core\git-credential-store.exe
	File: exec_cmd.c, Line 23

	Expression: argv0_path

	This application has requested the Runtime to terminate it in an
	unusual way.  Please contact the application's support team for
	more information.

This fixes #766

Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
dscho added a commit that referenced this issue Jul 29, 2016
As of 1a9d15d (tempfile: a new module for handling temporary files,
2015-08-10), the temporary files which are used by the lock file
machinery adjust the permissions, and to do that, the config is read,
which in turn requires the config to be read.

This means that the runtime prefix needs to be resolved properly, but we
did not set that correctly in credential-store.

The symptom of this bug: when running

	printf '%s\n%s\n%s\n%s\n' \
		'protocol=https' 'host=gitblub.com' \
		'username=hello' 'password=world' |
	git credential-store store

an assertion is thrown:

	Assertion failed!

	Program: ...\libexec\git-core\git-credential-store.exe
	File: exec_cmd.c, Line 23

	Expression: argv0_path

	This application has requested the Runtime to terminate it in an
	unusual way.  Please contact the application's support team for
	more information.

This fixes #766

Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
dscho added a commit that referenced this issue Aug 2, 2016
As of 1a9d15d (tempfile: a new module for handling temporary files,
2015-08-10), the temporary files which are used by the lock file
machinery adjust the permissions, and to do that, the config is read,
which in turn requires the config to be read.

This means that the runtime prefix needs to be resolved properly, but we
did not set that correctly in credential-store.

The symptom of this bug: when running

	printf '%s\n%s\n%s\n%s\n' \
		'protocol=https' 'host=gitblub.com' \
		'username=hello' 'password=world' |
	git credential-store store

an assertion is thrown:

	Assertion failed!

	Program: ...\libexec\git-core\git-credential-store.exe
	File: exec_cmd.c, Line 23

	Expression: argv0_path

	This application has requested the Runtime to terminate it in an
	unusual way.  Please contact the application's support team for
	more information.

This fixes #766

Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
dscho added a commit that referenced this issue Aug 2, 2016
As of 1a9d15d (tempfile: a new module for handling temporary files,
2015-08-10), the temporary files which are used by the lock file
machinery adjust the permissions, and to do that, the config is read,
which in turn requires the config to be read.

This means that the runtime prefix needs to be resolved properly, but we
did not set that correctly in credential-store.

The symptom of this bug: when running

	printf '%s\n%s\n%s\n%s\n' \
		'protocol=https' 'host=gitblub.com' \
		'username=hello' 'password=world' |
	git credential-store store

an assertion is thrown:

	Assertion failed!

	Program: ...\libexec\git-core\git-credential-store.exe
	File: exec_cmd.c, Line 23

	Expression: argv0_path

	This application has requested the Runtime to terminate it in an
	unusual way.  Please contact the application's support team for
	more information.

This fixes #766

Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
dscho added a commit that referenced this issue Aug 2, 2016
As of 1a9d15d (tempfile: a new module for handling temporary files,
2015-08-10), the temporary files which are used by the lock file
machinery adjust the permissions, and to do that, the config is read,
which in turn requires the config to be read.

This means that the runtime prefix needs to be resolved properly, but we
did not set that correctly in credential-store.

The symptom of this bug: when running

	printf '%s\n%s\n%s\n%s\n' \
		'protocol=https' 'host=gitblub.com' \
		'username=hello' 'password=world' |
	git credential-store store

an assertion is thrown:

	Assertion failed!

	Program: ...\libexec\git-core\git-credential-store.exe
	File: exec_cmd.c, Line 23

	Expression: argv0_path

	This application has requested the Runtime to terminate it in an
	unusual way.  Please contact the application's support team for
	more information.

This fixes #766

Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
dscho added a commit that referenced this issue Aug 2, 2016
As of 1a9d15d (tempfile: a new module for handling temporary files,
2015-08-10), the temporary files which are used by the lock file
machinery adjust the permissions, and to do that, the config is read,
which in turn requires the config to be read.

This means that the runtime prefix needs to be resolved properly, but we
did not set that correctly in credential-store.

The symptom of this bug: when running

	printf '%s\n%s\n%s\n%s\n' \
		'protocol=https' 'host=gitblub.com' \
		'username=hello' 'password=world' |
	git credential-store store

an assertion is thrown:

	Assertion failed!

	Program: ...\libexec\git-core\git-credential-store.exe
	File: exec_cmd.c, Line 23

	Expression: argv0_path

	This application has requested the Runtime to terminate it in an
	unusual way.  Please contact the application's support team for
	more information.

This fixes #766

Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
dscho added a commit that referenced this issue Aug 5, 2016
As of 1a9d15d (tempfile: a new module for handling temporary files,
2015-08-10), the temporary files which are used by the lock file
machinery adjust the permissions, and to do that, the config is read,
which in turn requires the config to be read.

This means that the runtime prefix needs to be resolved properly, but we
did not set that correctly in credential-store.

The symptom of this bug: when running

	printf '%s\n%s\n%s\n%s\n' \
		'protocol=https' 'host=gitblub.com' \
		'username=hello' 'password=world' |
	git credential-store store

an assertion is thrown:

	Assertion failed!

	Program: ...\libexec\git-core\git-credential-store.exe
	File: exec_cmd.c, Line 23

	Expression: argv0_path

	This application has requested the Runtime to terminate it in an
	unusual way.  Please contact the application's support team for
	more information.

This fixes #766

Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
dscho added a commit that referenced this issue Aug 6, 2016
As of 1a9d15d (tempfile: a new module for handling temporary files,
2015-08-10), the temporary files which are used by the lock file
machinery adjust the permissions, and to do that, the config is read,
which in turn requires the config to be read.

This means that the runtime prefix needs to be resolved properly, but we
did not set that correctly in credential-store.

The symptom of this bug: when running

	printf '%s\n%s\n%s\n%s\n' \
		'protocol=https' 'host=gitblub.com' \
		'username=hello' 'password=world' |
	git credential-store store

an assertion is thrown:

	Assertion failed!

	Program: ...\libexec\git-core\git-credential-store.exe
	File: exec_cmd.c, Line 23

	Expression: argv0_path

	This application has requested the Runtime to terminate it in an
	unusual way.  Please contact the application's support team for
	more information.

This fixes #766

Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
dscho added a commit that referenced this issue Aug 7, 2016
As of 1a9d15d (tempfile: a new module for handling temporary files,
2015-08-10), the temporary files which are used by the lock file
machinery adjust the permissions, and to do that, the config is read,
which in turn requires the config to be read.

This means that the runtime prefix needs to be resolved properly, but we
did not set that correctly in credential-store.

The symptom of this bug: when running

	printf '%s\n%s\n%s\n%s\n' \
		'protocol=https' 'host=gitblub.com' \
		'username=hello' 'password=world' |
	git credential-store store

an assertion is thrown:

	Assertion failed!

	Program: ...\libexec\git-core\git-credential-store.exe
	File: exec_cmd.c, Line 23

	Expression: argv0_path

	This application has requested the Runtime to terminate it in an
	unusual way.  Please contact the application's support team for
	more information.

This fixes #766

Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
dscho added a commit that referenced this issue Aug 9, 2016
As of 1a9d15d (tempfile: a new module for handling temporary files,
2015-08-10), the temporary files which are used by the lock file
machinery adjust the permissions, and to do that, the config is read,
which in turn requires the config to be read.

This means that the runtime prefix needs to be resolved properly, but we
did not set that correctly in credential-store.

The symptom of this bug: when running

	printf '%s\n%s\n%s\n%s\n' \
		'protocol=https' 'host=gitblub.com' \
		'username=hello' 'password=world' |
	git credential-store store

an assertion is thrown:

	Assertion failed!

	Program: ...\libexec\git-core\git-credential-store.exe
	File: exec_cmd.c, Line 23

	Expression: argv0_path

	This application has requested the Runtime to terminate it in an
	unusual way.  Please contact the application's support team for
	more information.

This fixes #766

Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
dscho added a commit that referenced this issue Aug 9, 2016
As of 1a9d15d (tempfile: a new module for handling temporary files,
2015-08-10), the temporary files which are used by the lock file
machinery adjust the permissions, and to do that, the config is read,
which in turn requires the config to be read.

This means that the runtime prefix needs to be resolved properly, but we
did not set that correctly in credential-store.

The symptom of this bug: when running

	printf '%s\n%s\n%s\n%s\n' \
		'protocol=https' 'host=gitblub.com' \
		'username=hello' 'password=world' |
	git credential-store store

an assertion is thrown:

	Assertion failed!

	Program: ...\libexec\git-core\git-credential-store.exe
	File: exec_cmd.c, Line 23

	Expression: argv0_path

	This application has requested the Runtime to terminate it in an
	unusual way.  Please contact the application's support team for
	more information.

This fixes #766

Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
dscho added a commit that referenced this issue Aug 9, 2016
As of 1a9d15d (tempfile: a new module for handling temporary files,
2015-08-10), the temporary files which are used by the lock file
machinery adjust the permissions, and to do that, the config is read,
which in turn requires the config to be read.

This means that the runtime prefix needs to be resolved properly, but we
did not set that correctly in credential-store.

The symptom of this bug: when running

	printf '%s\n%s\n%s\n%s\n' \
		'protocol=https' 'host=gitblub.com' \
		'username=hello' 'password=world' |
	git credential-store store

an assertion is thrown:

	Assertion failed!

	Program: ...\libexec\git-core\git-credential-store.exe
	File: exec_cmd.c, Line 23

	Expression: argv0_path

	This application has requested the Runtime to terminate it in an
	unusual way.  Please contact the application's support team for
	more information.

This fixes #766

Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
dscho added a commit that referenced this issue Aug 10, 2016
As of 1a9d15d (tempfile: a new module for handling temporary files,
2015-08-10), the temporary files which are used by the lock file
machinery adjust the permissions, and to do that, the config is read,
which in turn requires the config to be read.

This means that the runtime prefix needs to be resolved properly, but we
did not set that correctly in credential-store.

The symptom of this bug: when running

	printf '%s\n%s\n%s\n%s\n' \
		'protocol=https' 'host=gitblub.com' \
		'username=hello' 'password=world' |
	git credential-store store

an assertion is thrown:

	Assertion failed!

	Program: ...\libexec\git-core\git-credential-store.exe
	File: exec_cmd.c, Line 23

	Expression: argv0_path

	This application has requested the Runtime to terminate it in an
	unusual way.  Please contact the application's support team for
	more information.

This fixes #766

Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
@jeremykid
Copy link

I remove the .git-credentials.lock file and it works

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

11 participants