GPG Guide:

This Project for CommandLine Applications. includes configs and documentation. https://mrinjamul.github.io/unTutorials

GPG Guide:

[GPG backup and restore]

List Secret Keys:

 gpg --list-secret-keys
 gpg --list-secret-keys --keyid-format LONG

Export public key:

 gpg --armor --export <key-id>

Git Configure:

 git config --global user.signingkey "<secret_id>"
 git config --global commit.gpgsign true

Export following into bashrc or zshrc:

export GPG_TTY=\$(tty)

Backup gpg key:

 gpg -a --export <user email> > admin-public-gpg-key
 gpg -a --export-secret-keys <user email> > admin-secret-gpg-key
 gpg --export-ownertrust > admin-ownertrust-gpg.txt

Restore gpg key:

 gpg --import admin-secret-gpg-key
 gpg --import-ownertrust admin-ownertrust-gpg.txt

If .gnugpg directory is empty then configure gpg using following command:

 gpgconf --kill gpg-agent