I am trying to automate backups with duplicity, but when I test the result, I get
duplicity
gpg: public key decryption failed: bad passphrase
This is a shorter command line to check if passphrase is OK:
gpg --export-secret-keys -a > /dev/null && echo OK