GPG doesn't work in crontab

Solution 1:

Add -vv to the gpg command to see more output. It might have to do with a missing ~/.gnupg though.

Solution 2:

/usr/bin/gpg --no-tty --passphrase-file /home/vouuuuuuuuu/settings/passfile.txt --decrypt-files /home/juhuuu/dirname/*.gpg;
  • works fine now thank to --no-tty
  • before in cron job log gpg: cannot open/dev/tty': No such device or address`
  • so it could not execute before, now is fine!

Solution 3:

To resolve this problem just add the "--no-tty" option to your gpg command line. answer was taken from a cached google page