Skip to content

Instantly share code, notes, and snippets.

@Integralist
Last active August 27, 2021 16:22
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Integralist/975d099da6aad2373b225b7713d20a7c to your computer and use it in GitHub Desktop.
Save Integralist/975d099da6aad2373b225b7713d20a7c to your computer and use it in GitHub Desktop.
[Export GPG Private Key] #gpg #private #key #export #backup
# reference:
# man gpg
KEY_ID=$(gpg --list-keys Pass | head -n 2 | tail -n 1 | cut -d ' ' -f 7)
gpg --list-secret-keys Pass
gpg --export-secret-keys <KEY_ID> > private.key
gpg --armor --export-secret-keys <KEY_ID> > private.key.asc
gpg --output fullbackup.pgp --armor --export-secret-keys --export-options export-backup Pass
# if you're not comfortable with the security of your chose passphrase
# then consider making a paper backup which can be stored in a fireproof safe
# https://www.jabberwocky.com/software/paperkey/
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment