Macos – Confirming a GPG key as mine

gnupgmacos

I imported a public/private key pair generated on my desktop into my laptop. Now however I get this issue when I try to encrypt a file for my own use:

gpg -e -r "Jonathan Max Barnes" random-text-file
gpg: C1E2B437: There is no assurance this key belongs to the named user

pub  4096R/C1E2B437 2013-09-06 Jonathan Max Barnes (Jonny) <jonny@jonnybarnes.net>
 Primary key fingerprint: B068 1437 14F5 2628 5404  92FE 6C13 E65E CABC 1625
      Subkey fingerprint: 6F61 DBBA A310 B7D6 4E87  7409 C71A C485 C1E2 B437

It is NOT certain that the key belongs to the person named
in the user ID.  If you *really* know what you are doing,
you may answer the next question with yes.

Use this key anyway? (y/N)
gpg: random-text-file: encryption failed: Unusable public key #obviously pressing y forces gpg to encrypt

I am certain the key is my key, how can I tell gpg this is the case?

Best Answer

Try trusting the public key:

gpg --edit-key "Jonathan Max Barnes"

then at Command> prompt type

trust

then answer 4 for fully to the resulting question.

Details here

Related Question