Hi mj.

Thus spoke mj:
> We are trying to encrypt log files via logrotate & cron, and I hope
> someone here can help out a bit.
>
> Our logrotate configuration file contains:
>
>>     olddir gpg/
>>     compress
>>     compresscmd /usr/bin/gpg
>>     compressoptions -vv --verbose --encrypt --default-key A4DB7xxxD98
>>     compressext .gpg
>
> Now, when logrotates runs the above from cron, we're getting:
>
>> gpg: cannot open '/dev/tty': No such device or address
>> error: failed to compress log /logrotate/gpg//test.log.1

When I run the command

    gpg -vv --verbose --encrypt --default-key 0x...  < /dev/null

GnuPG prompts me for a recipient. Without a TTY, such a prompt would
fail, of course. So presumably, instead of --default-key, you actually
want -r instead...?

Also: why are you using both -vv and --verbose at the same time?

> We know --no-tty exists, but it doesn't help in this case, because
> when using that:
>
>> gpg: Sorry, no terminal at all requested - can't get input

See above. You probably also want --batch as well.

Cheers,
Marco

Attachment: OpenPGP_signature
Description: OpenPGP digital signature

_______________________________________________
Gnupg-users mailing list
Gnupg-users@gnupg.org
http://lists.gnupg.org/mailman/listinfo/gnupg-users

Reply via email to