Import GPG-Keys on Fedora

Fix the permissions of the enclosing directory ~/.gnupg because an attacker with enough rights on the folder could manipulate folder contents.

Make sure, the folder+contents belong to you:

chown -R $(whoami) ~/.gnupg/

Correct access rights for .gnupg and subfolders:

find ~/.gnupg -type f -exec chmod 600 {} \;
find ~/.gnupg -type d -exec chmod 700 {} \;

finally import your keys with your user (not sudo/root)

gpg --import key_sec.asc

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.