Why does `git config --global credential.helper` show wincred when it seems that I'm using Git Credential Manager Core?
Asked Answered
T

1

2

As I understand this article, Git Credential Manager Core is not the same with Git Credential Manager or Windows Credentials. After using this command
printf "host=github.com\nprotocol=https\nusername=ooker777\npassword=ghp_yourToken" | git credential-manager-core store
I'm able to push. Checking Windows Credentials I only see my GitHub password is stored in there, which will not work because GitHub requires it to be token. So it's clear that I'm not using wincred.

Yet git config --global credential.helper still shows that I'm using wincred. Why is that?

Tempest answered 3/12, 2022 at 9:42 Comment(1)
Upgrading Git will not, in general, touch your own configuration in any way. Git configurations are so flexible and so personal that this would be a minefield.Eurhythmics
P
3

wincred was the legacy credential storage on Windows.

It has been replaced by GCM (Git Credential Manager), and after Git 2.38.1, is called manager (no longer "manager-core")

If you have upgraded Git for Windows, you can safely change your credential helper to manager.

# up to Git 2.38.1 on Windows
git config --global credential.helper manager-core

# Git 2.39+
git config --global credential.helper manager
Prestigious answered 3/12, 2022 at 10:23 Comment(5)
so should the new GCM be considered as an upgraded version of the old GCM, or a totally different, unrelated one?Tempest
and why is it that git config --global credential.helper still shows wincredTempest
@Tempest the new GCM is cross-platform and replaces a bunch of legacy system-specific credentials helpers (including wincred). Your current helper shows wincred because you might have started with an old Git for Windows (type git --version to confirm).Prestigious
so I understand that the new GCM is a totally, different program to the old GCM, which happens to make the old one obsolete.// My version was indeed old (2.33.0.windows.2), but as it was clear that wincred wasn't used, I don't understand why it didn't reflect that. What's more is that I have upgrade it to 2.38.1, yet it still shows wincredTempest
@Tempest When you upgrade, it does not set the credential helper if it was previously set. You can go ahead and safely change it nowPrestigious

© 2022 - 2024 — McMap. All rights reserved.