One password is no problem
I wanted to store my credentials "safely" for use by git so I did as instructed
here. This way I don't have to input password/PAT every single time, I perform any git operation.
- Install - libsecretusing- sudo apt-get install libsecret-1-0 libsecret-1-dev
- Build the "credential manager" using - sudo make --directory=/usr/share/doc/git/contrib/credential/libsecret
- and then configure my local git folder using - git config --global credential.helper \ /usr/share/doc/git/contrib/credential/libsecret/git-credential-libsecret
Works superb.
How to do the above with many passwords?
What I don't get is how to do the same for many passwords associated with different accounts/repositories. I was suggested to use gcm core.
I tried installing gcm core as instructed here.
- Download .deb package 
- sudo dpkg -i <path-to-package> git-credential-manager-core configure
- configure the "credential store" - git config credential.credentialStore secretservice(as I use libsecret).
- I removed the - Credential helperpointing to- /usr/share/doc/git/contrib/credential/libsecret/git-credential-libsecretfrom the local git config file.
It still doesn't work. When I try to push a repo, I get a garbled
message with how to use git config followed by request to fill in
credentials (shown here).  I don't understand what I am doing! namely credential store, credential manager, secret-service and gcm core.
 
    