Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

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 doesn't seem to work.


I'm SSH'ing to a machine, then running Duplicity; below is the CMD, 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 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:

Any help much appreciated.

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: It didn't when I used to use it. If it does now, that's a pretty serious regression in, security, useability, and resource consumption. – womble Aug 6 '12 at 10:47
up vote 2 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.