Signing files using gpg

GPG or GnuPG is an open source alternative for PGP used in the Linux environment. I had to install this application for some research.

After creating key pair for myself, I imported a number of keys used by my friends. I decided to encrypt file. When I tried to encrypt the file I got the following error:

There is no assurance this key belongs to the named user

Then gpg asked for my permission to use that user's key:

Use this key anyway? (y/N)

I spend a lot of time looking for a way to get rid of this error. After some googling I found the following recommendation. Before encrypting file, it is recomended to sign public key used by destinating user.

I did that using the following command but it still didn't helped me:
gpg --sign-key user-name

So, I started once again looking for alternative solution. Eventually I found one:
I had to add --always-trust command argument to gpg command like in the following example:

gpg -r "USER_NAME" --always-trust --encrypt ./file-name.txt

Reply

Add image
  • Web page addresses and e-mail addresses turn into links automatically.
  • Lines and paragraphs break automatically.
  • Images can be added to this post.

More information about formatting options

CAPTCHA
This question is for testing whether you are a human visitor and to prevent automated spam submissions.