Encrypt - but no such user-id

Neil Williams linux at codehelp.co.uk
Thu Mar 10 20:57:48 CET 2005

On Thursday 10 March 2005 7:16 am, ml at charliesangels.biz wrote:
> gpg --list-keys shows the key.
> 2) Now I try to sign a file:

No, now you are trying to encrypt a file. To sign a file, use
gpg -b
gpg -s

I generally use -a as well to make it a text signature that can be easier to 
inspect and as I'm usually signing files for distribution, I use a detached 
signature that doesn't alter the file itself.

gpg -ab

> [sascha at localhost tmp]$ gpg -e test

Who are you encrypting TO? gpg could use any key in the keyring to encrypt the 
content, you need to tell gpg who is the intended recipient?

Who should be able to read this message? gpg cannot assume it was the most 
recently imported key, you need to tell gpg that you want the message 
encrypted TO a particular person.

gpg -r myfriend -e test
gpg -r 0x28bcb3e3 -e test

> gpg: WARNUNG: Sensible Daten könnten auf Platte ausgelagert werden.
> gpg: siehe http://www.gnupg.org/faq.html für weitere Informationen
> Sie haben keine User-ID angegeben (Sie können die Option "-r"

You have not given a User ID, use the option -r. gpg is telling you what you 
need to do. Tell gpg who is meant to read this encrypted text.

> Current recipients:
> Geben Sie die User-ID ein. Beenden mit einer leeren Zeile: 12345
> Keine solche User-ID vorhanden.

Provide a User ID of someone who should be able to decrypt the item. If that 
is only you, then you can use the default-recipient option in gpg.conf.
default-recipient name
                 Use  name  as default recipient if option --recipient is not 
used and don't ask if this is a valid one.

> Somehow it seems, that the key is corrupt - but I still don't get it.
> Why does import work - but encryption not ?

Because you haven't said who should be allowed to decrypt it. 


Neil Williams

-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
Url : /pipermail/attachments/20050310/9a097696/attachment.pgp

More information about the Gnupg-users mailing list