7

I'm trying to copy my gpg related files over from an old machine to a new one.

I've worked out how to copy the keys over: How to import secret gpg key (copied from one machine to another)? but this leaves me with gpg complaining that it doesn't trust the imported keys.

How do I transfer the trust db from one machine to another?

user50849
  • 5,202

1 Answers1

8

You can copy ~/.gnupg/trustdb.gpg from one machine to another.

You can also export the ownertrust values (which are the ones that matter) and import them on the new machine:

gpg --export-ownertrust > otrust.txt

rm ~/.gnupg/trustdb.gpg
gpg --import-ownertrust < otrust.txt

See the gpg manpage for details (although the version on the website doesn't say much more than I have).

Stephen Kitt
  • 434,908