Skip to content

Instantly share code, notes, and snippets.

@pranavmishra90
Last active January 26, 2023 07:58
Show Gist options
  • Save pranavmishra90/1073cac3e2152e1d015af5c973c8b789 to your computer and use it in GitHub Desktop.
Save pranavmishra90/1073cac3e2152e1d015af5c973c8b789 to your computer and use it in GitHub Desktop.
Initializing a new GPG keyring
# Create a new GPG keyring
gpg -K
# Change ownership of the GnuPG directory
sudo chown -R $(whoami) ~/.gnupg/
# Change directory permissions so that only the owner has read/write access to files and enter into the directory
sudo find ~/.gnupg -type f -exec chmod 600 {} \;
sudo find ~/.gnupg -type d -exec chmod 700 {} \;
# Test the permissions
gpg -K
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment