use-agent doesn't work with gpg2

Bug #842990 reported by Ross Williams
10
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Duplicity
Fix Released
Undecided
Unassigned

Bug Description

If use-agent is specified and gpg2 is installed and being used by duplicity, the gpg binary fails to get the password from gpg-agent. This appears to be caused by the --passphrase-fd option, which forces gpg to get the passphrase from duplicity instead of from the agent. This is in contrast to GnuPG 1.x behavior, when use-agent took priority over passphrase-fd. I've submitted a proposed fix in a related branch.

Duplicity 0.6.15
Python 2.7.2
Mac OS X 10.7.1

Log output:
GPG error detail: Traceback (most recent call last):
  File "/opt/local/bin/duplicity", line 1333, in <module>
    with_tempdir(main)
  File "/opt/local/bin/duplicity", line 1316, in with_tempdir
    fn()
  File "/opt/local/bin/duplicity", line 1286, in main
    full_backup(col_stats)
  File "/opt/local/bin/duplicity", line 455, in full_backup
    globals.backend)
  File "/opt/local/bin/duplicity", line 333, in write_multivol
    globals.gpg_profile, globals.volsize)
  File "/opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/duplicity/gpg.py", line 298, in GPGWriteFile
    file.write(data)
  File "/opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/duplicity/gpg.py", line 168, in write
    self.gpg_failed()
  File "/opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/duplicity/gpg.py", line 180, in gpg_failed
    raise GPGError, msg
GPGError: GPG Failed, see log below:
===== Begin GnuPG log =====
gpg: no default secret key: Bad passphrase
gpg: [stdin]: sign+encrypt failed: Bad passphrase
===== End GnuPG log =====

Removing still remembered temporary file /Users/XXXX/.cache/duplicity/duply_test/duplicity-rGhhbk-tempdir/mktemp-SYqbzW-1
Removing still remembered temporary file /Users/XXXX/.cache/duplicity/duply_test/duplicity-udfnfS-tempdir/mktemp-hssitk-1
13:09:58.000 Task 'FULL' failed with exit code '31'.
--- Finished state FAILED 'code 31' at 13:09:58.000 - Runtime 00:00:00.000 ---

Related branches

edso (ed.so)
Changed in duplicity:
status: New → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.