Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

List git credentials from credential helper

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

  1. (repository_home) /.git/config - there is no info about the username and password

  2. ~/.gitconfig - file not found in the repo folder

like image 347
shellakkshellu Avatar asked Aug 04 '20 17:08

shellakkshellu


1 Answers

From git-credential git credential fill could be helpful here, you need to input host and protocol details to get username and password.

$ git credential fill
protocol=https
host=example.com

Output:

protocol=https
host=example.com
username=bob
password=secret
like image 171
Vijay Avatar answered Sep 28 '22 02:09

Vijay