gpg --list-keys --keyid-format LONG
gpg --export-secret-keys BA202938CB1C0C1E251F966ADE30627E53AC3969 > XXXXXX_priv.asc
gpg -d ./XXXXXXX.gpg
gpg -c virsh.md
gpg --export --armor --output jparrill_redhat.asc jparrill@redhat.com
gpg --full-gen-key
zip -er old_gpg.zip old_gpg
Identify your private key by running gpg --list-secret-keys. You need the ID of your private key (second column)
Run this command to export your key: gpg --export-secret-keys $ID > my-private-key.asc
Copy the key to the other machine (scp is your friend)
To import the key, run gpg --import my-private-key.asc
If the key already existed on the second machine, the import will fail saying 'Key already known'. You will have to delete both the private and public key first (gpg --delete-keys and gpg --delete-secret-keys)
zip -er old_gpg.zip old_gpg
gpg --full-gen-key
gpg --export --armor --output jparrill_redhat.asc jparrill@redhat.com
gpg --list-secret-keys --keyid-format LONG
gpg --send-keys --keyserver hkp://pgp.mit.edu KEY_ID
gpg --export-secret-keys BA202938CB1C0C1E251F966ADE30627E53AC3969 > jparrill_redhat_priv.asc
# You could check the signing key listing the keys with long format
git config --global user.signingkey 9D253FF3D56812CA
git config --global commit.gpgsign true
git config --global gpg.program gpg
gpg --list-keys (get the ID)
pub rsa4096/DE30627E53AC3969 2019-07-30 [SC]
BA202938CB1C0C1E251F966ADE30627E53AC3969 <----- THIS ONE
uid [ultimate] Juan Manuel Parrilla Madrid (Red Hat Key for daily basis) <jparrill@redhat.com>
sub rsa4096/7A3E889C6FE921D0 2019-07-30 [E]
Now create a new storage for it
pass init BA202938CB1C0C1E251F966ADE30627E53AC3969
pass insert RedHat/kerberos
# You could check the signing key listing the keys with long format
git config --global user.signingkey 9D253FF3D56812CA
git config --global commit.gpgsign true
git config --global gpg.program gpg