# GnuPG always prompting for passphrase

## dragor

I've been using duplicity for automated backups from a cron script for years.  Recently I updated gnupg to version 2.1.15 and it's causing problems.  I've been setting the environment variable in my cron job script for the passphrase.  The export is done like this:

```

export PASSPHRASE=****

```

Now it seems that gnupg doesn't use this environment variable any more.  It will always show a dialog to ask for a passphrase.  This is fine when I run the script manually, but fails from a cronjob.

So my question is, how do I fix this?  How can I automate duplicity and gnupg to run from a cronjob where it does not need any user input?  Is there a new environment variable to set?  An option to pass to duplicity so it can pass the passphrase to gnupg?

Thanks

----------

## khayyam

dragor ...

using =app-crypt/gnupg-1.4.x in place of 2.x should resolve the issue, see this post for details.

HTH & best ... khay

----------

## Hu

If you want the key to be usable without user intervention, and you are willing to have the passphrase stored on disk, why not remove the passphrase instead?

----------

