Credential management in Git should not be difficult to use or configure, but (unfortunately) looking at the existing tools, it is difficult to even think about it, let alone configure them without errors.
NOT. ANY. MORE!
git-credential-netconf, an easy yet powerful way to manage your Git credentials by harnessing the power of GnuPG!
The following guide assumes you have a GPG key.
pip install git-credential-netconf
[conf] login = yourname password = very-secret-password
.netconf file uses configuration file format.
gpg --recipient firstname.lastname@example.org --output ~/.netconf.gpg \ --encrypt --sign ~/.netconf
And remove your original
.netconf for security:
shred -u ~/.netconf
⚠️ Make sure that
~/.local/bin is in
git config --global credential.helper 'netconf --debug'
This will prompt
git-credential-netconf to decrypt the
~/.netconf.gpg file using
GPG and fetch the
password, among other values.
You'll be asked for the password to
GPG private key when decrypting.
I hope this article helps you in managing your precious credentials a bit better.
Questions? Comments? Concerns? Please put them down below and I'd be happy to help you.
Image Source: Manjaro's /usr/share/backgrounds folder 😃