gnupg: There is no assurance this key belongs to the named user

EncryptionPasswordsPublic Key-EncryptionGnupg

Encryption Problem Overview


I'm trying to use interesting password management tool named Pass.

I did the following:

  1. Installed gpg tool $ sudo dnf install gpg
  2. Generated a key using $ gpg --gen-key
  3. Typed $ pass init "foobar id of my gpg key" as stated here
  4. Got

mkdir: created directory ‘/home/chichivica/.password-store/’ Password store initialized for [email protected]

  1. Tried to add a simple password

$ pass insert foo Enter password for foo: Retype password for foo:

  1. And there is the problem

gpg: A45A123C: There is no assurance this key belongs to the named user gpg: [stdin]: encryption failed: Unusable public key

Could anyone give me some advice?

Encryption Solutions


Solution 1 - Encryption

I had the same issue after copying my key pair from one machine to another. The solution for me was the set the trust level of the keys:

gpg --edit-key <KEY_ID>
gpg> trust

You will be asked to select the trust level from the following:

1 = I don't know or won't say
2 = I do NOT trust
3 = I trust marginally
4 = I trust fully
5 = I trust ultimately
m = back to the main menu

I selected 5 since I created the key so of course I trust it ultimately :). It will ask you to confirm your decision:

Your decision? 5
Do you really want to set this key to ultimate trust? (y/N) y

After confirming, quit with:

gpg> quit

You should then be able to encrypt using that key.

Attributions

All content for this solution is sourced from the original question on Stackoverflow.

The content on this page is licensed under the Attribution-ShareAlike 4.0 International (CC BY-SA 4.0) license.

Content TypeOriginal AuthorOriginal Content on Stackoverflow
QuestionIvan TalalaevView Question on Stackoverflow
Solution 1 - EncryptionJonView Answer on Stackoverflow