Seems like a simple problem but I can't find a solution, in my git config credentials stored
in the cache(username and personal access token) the git config --list returns the credential info like this
credential.helper=cache
Is it possible to see the credentials from the cache, I tried the following three locations
(repository_home)
/.git/config- there is no info about the username and password~/.gitconfig- file not found in the repo folder
It is possible for you to query a particular set of credentials from the credential helper, but there isn't a part of the credential helper protocol that allows you to query all credentials. In general, this is hard, because a credential helper can respond to all credentials that match a pattern, such as
https://*.example.orgorhttps://github.com/bk2204/*, and that pattern need not match any simple pattern that can be expressed (for example, the helper could have intimate knowledge about which repositories a user has access to based on LDAP).For the
cachecredential helper, there isn't a way to enumerate those credentials.If you want to look up the credentials for a particular URL, the easiest way to do that is like this:
That will print the credentials that any credential helper knows about. You can see more about the protocol in the
gitcredentials(7)man page.