Skip to content

Instantly share code, notes, and snippets.

@OhYee
Created September 9, 2019 12:41
Show Gist options
  • Save OhYee/8e875adcb865b8e7b7bc61eca2c591a4 to your computer and use it in GitHub Desktop.
Save OhYee/8e875adcb865b8e7b7bc61eca2c591a4 to your computer and use it in GitHub Desktop.
GPG backup and restore
#!/bin/bash
gpg --armor --export > pgp-public-keys.asc
gpg --armor --export-secret-keys > pgp-private-keys.asc
gpg --export-ownertrust > pgp-ownertrust.asc
OhYee%
#!/bin/bash
gpg --import pgp-public-keys.asc
gpg --import pgp-private-keys.asc
gpg --import-ownertrust pgp-ownertrust.asc
OhYee%
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment