Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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

People also ask

What is GnuPG public key?

GnuPG uses public-key cryptography so that users may communicate securely. In a public-key system, each user has a pair of keys consisting of a private key and a public key. A user's private key is kept secret; it need never be revealed. The public key may be given to anyone with whom the user wants to communicate.

What is required before GnuPG can create an encryption key pair?

To receive an encrypted file that only you can open, you first need to create a key pair and then share your public key. Creating the key pair is similar to creating ssh keys in that you choose a key size, specify an identifier, and set a passphrase.

What encryption does GnuPG use?

GnuPG also supports symmetric encryption algorithms. By default, GnuPG uses the AES symmetrical algorithm since version 2.1, CAST5 was used in earlier versions. GnuPG does not use patented or otherwise restricted software or algorithms.


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.