I've tried a number of obvious commands as detailed in Duplicity Man page to do this but it doesn't seem to work.


I'm SSH'ing to a machine, then running Duplicity; below is the command, of sorts:-

ssh -i /keys/key.pem -o StrictHostKeyChecking=no user@ipAddress "sudo duplicity --s3-european-buckets --s3-use-new-style /local/dir/stuff s3+http://bucket/dir/"

Problem is, it's always asking for a passphrase, and I want to run this as an automated process without CLi user replies. The man page's only precise reference is to the environment variable PASSPHRASE, but makes little mention (with encrypt-key or sign-key which seem different) how this can be set.

NOTE: It's asking for GnuPG passphrase

  • Which passphrase is it asking for?
    – womble
    Aug 6, 2012 at 10:26
  • Added, it's asking for GnuPG
    – waxical
    Aug 6, 2012 at 10:40
  • Why is it asking for a GnuPG passphrase? It should only need that to decrypt.
    – womble
    Aug 6, 2012 at 10:42
  • 2
    @womble duplicity needs to decrypt previous backups in order to do incremental backups
    – ptman
    Aug 6, 2012 at 10:45
  • 2
    @ptman Duplicity doesn't need to decrypt previous backups to do incrementals - the reason it is asking for the passphrase is that GPG keys are used for two purposes 1) encryption 2) signatures, and it's the signatures that the passphrase is needed for in this situation. It's best practice to specify a separate key for the signatures with --sign-key - without it Duplicity will use the same key for signing and encrypting.
    – Eborbob
    Jun 27, 2016 at 13:34

2 Answers 2


you can pass environment variables using env(1):

env PASSPHRASE=.... duplicity ...
  • Yes, I cite that in the post. How to set it is the question.
    – waxical
    Aug 6, 2012 at 10:49
  • I see a link added now. Will try... edit/ BINGO!
    – waxical
    Aug 6, 2012 at 10:50

you are using sudo, so, you need to change options in /etc/sudoers file Google Here

  • 1
    Are you sure, this is GnuPG passphrase yeah? Not an access password for sudo'ing.
    – waxical
    Aug 6, 2012 at 10:39

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.