Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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

share|improve this question
Which passphrase is it asking for? – womble Aug 6 '12 at 10:26
Added, it's asking for GnuPG – waxical Aug 6 '12 at 10:40
Why is it asking for a GnuPG passphrase? It should only need that to decrypt. – womble Aug 6 '12 at 10:42
@womble duplicity needs to decrypt previous backups in order to do incremental backups – ptman Aug 6 '12 at 10:45
@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 at 13:34
up vote 3 down vote accepted

you can pass environment variables using env(1):

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

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

share|improve this answer
Are you sure, this is GnuPG passphrase yeah? Not an access password for sudo'ing. – waxical Aug 6 '12 at 10:39

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

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