简体   繁体   English

使用 git 凭据填充命令时,从 Windows 凭据管理器中删除凭据仍然显示凭据

[英]Deleting the credentials from Windows Credential Manager still displayed credentials when using git credential fill command

I'm running the latest Git For Windows 2.29.2 , and for me credential.helper is set to manager-core by default.我正在运行最新的Git For Windows 2.29.2 ,对我来说credential.helper默认设置为manager-core I did confirm that running git config --system --list .我确实确认运行git config --system --list

I wanted to implement token based authentication for any of the git operations w.r.t GitHub.我想为任何 git 操作 w.r.t GitHub 实现基于令牌的身份验证。 So I went ahead and deleted the credentials(which were originally username/password combinations) from the Control-Panel-> Credential manger -> Windows Credential -> Generic Credentials .所以我继续从Control-Panel-> Credential manger -> Windows Credential -> Generic Credentials中删除了凭据(最初是用户名/密码组合)。 I then executed the command:然后我执行了命令:

git credential fill
protocol=https
host=github.com`
<HIT ENTER KEY TWICE, as A blank line signals input completion>

To my surprise the above command still returned credentials.令我惊讶的是,上面的命令仍然返回凭据。 I went back to control panel and confirmed if it was deleted and I could not see the credentials, ie they were already deleted.我回到控制面板并确认它是否被删除并且我看不到凭据,即它们已经被删除。

Why then did the above command successfully return the credentials.为什么上面的命令成功地返回了凭据。 As far as I know git caches credentials for 15 minutes that too in memory.据我所知,git 在 memory 中也会缓存 15 分钟的凭据。 However the above command still returned the credentials after few hours.然而,上面的命令在几个小时后仍然返回了凭据。 I tried opening fresh prompts, but no luck until today after about a day I happened to notice that the behavior is no more reproduceable.我尝试打开新的提示,但直到今天才走运,大约一天后我碰巧注意到该行为不再可重现。

Now it works as expected, ie if I delete credentials from control panel's credential manager then the git credential fill is not able to return any credentials and instead provides me with a prompt to enter the credentials.现在它按预期工作,即如果我从控制面板的凭据管理器中删除凭据,则git credential fill无法返回任何凭据,而是提示我输入凭据。

Why did git credential fill return credentials in the first place even if I tried after several hours?为什么即使我在几个小时后尝试, git credential fill返回凭证? I'm just not able to get my head around this behavior.我只是无法理解这种行为。

git config --system list only shows system level config, try git config list --show-origin instead. git config --system list仅显示系统级配置,尝试git config list --show-origin代替。

You can have multiple credential helpers configured at different levels of config and git will use them in turn if the previous one doesn't return credentials, sounds like you might have another one configured elsewhere您可以在不同的配置级别配置多个凭证助手,如果前一个不返回凭证,git 将依次使用它们,听起来您可能在其他地方配置了另一个

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 GIT 凭据从 Windows 凭据管理器中消失 - GIT credentials disappearing from Windows Credential Manager 使用适用于Windows的Git Credential Manager保存GIT凭据 - 不起作用 - Save GIT Credentials using Git Credential Manager for Windows - Not working Windows的Git Credential Manager和文件中的凭据 - Git Credential Manager for Windows and credentials in a file Jenkins无法从Windows凭据管理器检测到GIT凭据 - Jenkins does not detect GIT credentials from Windows Credential manager 如何在 Windows 的 Git Credential Manager 中的每个 repo 本地存储凭据? - How to store credentials locally per repo in Git Credential Manager for Windows? Windows上的Git凭据帮助器,无需输入凭据 - Git Credential Helper on Windows without asking for credentials 使用Visual Studio时如何防止BitBucket凭据存储在Windows凭据管理器中? - How to prevent BitBucket credentials getting stored in Windows Credential Manager when using Visual Studio? 如何使用“ git credential-osxkeychain store”从命令行添加凭据? - how to add credentials from the command line using 'git credential-osxkeychain store'? 列出来自凭证助手的 git 凭证 - List git credentials from credential helper git:用户名或密码无效,即使在 Wincred 中也没有凭据管理器或凭据 - git: Invalid username or password even tough no credential manager or credentials in Wincred
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM