Securely migrate GPG keys (public, private) and their trust settings between machines, preserving trust relationships.
This toolkit consists of two Bash scripts:
gpg-export-all-with-trust.sh: Exports all GPG keys and trust settings from a source machine.gpg-import-all-with-trust.sh: Imports the exported keys and trust settings into a destination machine.
For full details, see the file: specs.md.
./gpg-export-all-with-trust.sh [export_directory]- If no directory is specified, defaults to
~/gpg-migration-export-YYYYMMDD-HHMMSS/. - Outputs:
- Armored public/private keys in
public-keys/andprivate-keys/. - Manifest files (
public-keys-manifest.tsv,private-keys-manifest.tsv). - Trust settings (
ownertrust-all.txt). - Summary log (
export-summary.txt).
- Armored public/private keys in
./gpg-import-all-with-trust.sh [import_directory]- If no directory is specified, defaults to the current working directory.
- Requires:
public-keys-manifest.tsvandprivate-keys-manifest.tsvin the import directory.
- Outputs:
- Imports keys into the GPG keyring.
- Applies trust settings from the manifests.
- Summary log (
import-summary-YYYYMMDD-HHMMSS.txt).