I'm running the latest Git For Windows 2.29.2 , and for me credential.helper
is set to manager-core
by default. I did confirm that running git config --system --list
.
I wanted to implement token based authentication for any of the git operations 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
.
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, i.e. 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. 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, i.e. 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.
Why did git credential fill
return credentials in the first place even if I tried after several hours? I'm just not able to get my head around this behavior.