I'm using .NET to run a task that commits and pushes changes to a git repository on Azure, but I'm getting the error:
fatal: Unable to persist credentials with the 'wincredman' credential store.
See https://aka.ms/gcm/credstores for more information.
When I try to do the final git command I need to do:
git push origin main
I also get:
Cygwin WARNING:
Couldnt compute FAST_CWD pointer. This typically occurs if youre using
an older Cygwin version on a newer Windows. Please update to the latest
available Cygwin version from https://cygwin.com/. If the problem persists,
please see https://cygwin.com/problems.html
before and
error: failed to execute prompt script (exit code 1)
fatal: could not read Username for 'https://[company].visualstudio.com': No such file or directory
after
but I do not believe that's causing the problem.
My commands are:
("PowerShell"); //so it can cd to the webshare.
(@"cd \\[filepath]\");
(@"git add *"); //stage new files or changes
(@"git commit -m ""Daily Mainframe Repository Commit"" "); //commit changes
(@"git push origin main"); //push changes to repo
("exit"); //Execute exit.
What does
fatal: Unable to persist credentials with the 'wincredman' credential store. See https://aka.ms/gcm/credstores for more information.
mean? I've looked at some documentation but that doesn't really help at diagnosis. Any ideas?
This fixed it for me under Windows 10 x64 and Git v2.43.0.windows.1:
git config --global credential.credentialStore dpapi
When I switched it back to wincredman the same error reappeared:
git config --global credential.credentialStore wincredman
More: https://github.com/git-ecosystem/git-credential-manager/blob/main/docs/credstores.md
I was using GitHub, I also generated a remote access token and reset the upstream repo:
git remote set-url origin https://username:[email protected]/username/repo.git
I generated the user access token under GitHub using [ Settings > Developer Settings > Personal Access Tokens > Tokens (classic) ]
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With