Automatic Encryption

Olaf Gellert og at
Thu Aug 26 10:25:42 CEST 2004

Hi all,

I am trying to use GPG for automatic encryption of files,
called by a script. My first attempt would be something

gpg --batch -a --yes -notty -r 0x799241C1 --encrypt file

What I do get is:

gpg: 799241C1: There is no indication that this key really belongs to the owner
gpg: todo: encryption failed: unusable public key

Ok, seems that GPG has a look into the trustdb.
But on this system I do not want to maintain a trustdb,
so I would like to tell GPG "yes, sure, do as I said"
on the command line.

Any ideas?


P.S.: Sometimes I wonder what the options "--batch" and
      "-notty" and "--yes" are good for if they are not
      always evaluated by GPG. If I call GPG with
      gpg --yes -notty -r 0x799241C1 --encrypt todo
      I am asked if gpg should really use this key. Well,
      why does GPG assume I did not mean "YES" and "NOTTY"?

Dipl.Inform. Olaf Gellert                  PRESECURE (R)
Consultant,                              Consulting GmbH
Phone: (+49) 0700 / PRESECURE           og at

                        A daily view on Internet Attacks

More information about the Gnupg-users mailing list