On Wed, 13 Dec 2017 02:17, [email protected] said:

> The gpg command is something like:
>
>   cmd... | gpg --default-recipient-self --encrypt --output filename.gpg

For all unattended use you need to add --batch (in all versions of gpg
since he very beginning).

>   gpg: cannot open '/dev/tty': No such device or address

Batch will also handle this.

> So I ran it manually and it turned out that --default-recipient-self
> no longer works:

There have been a couple of internal changes in the last years which may
have affected this option.

> I can specify the ID explicitly (i.e. [email protected]) and
> then it works but I shouldn't have to, should I?

It is always better to make it explict.  To debug your failure, please
run the encryption command agian but add 

  --verbose  --debug lookup

to the invocation

> (1) The documentation for --default-key says:
>
>   Use name as the default key to sign with.
>
> But the documentation for --default-recipient-self
> implies that it is also for encryption, not just signing.

Both commands are basically the same; they just differ in how the
default key is determined.  So, right the man page is wrong.


> (2) The documentation for --no-tty says:
>
>   Make sure that the TTY (terminal) is never used for any output...
>
> But it also makes sure that the TTY is not used for input as well.

Right.  But in practise you don't need it.  --batch is sufficient.


Shalom-Salam,

   Werner

-- 
Die Gedanken sind frei.  Ausnahmen regelt ein Bundesgesetz.

Attachment: pgpPGUFjZgdQV.pgp
Description: PGP signature

_______________________________________________
Gnupg-users mailing list
[email protected]
http://lists.gnupg.org/mailman/listinfo/gnupg-users

Reply via email to