duplicity crashes on resume when using gpg-agent

Bug #1438170 reported by Boyan Penkov on 2015-03-30
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Duplicity
Medium
Unassigned

Bug Description

When resuming an encrypted backup, duplicity crashes with a gpg error:

GPGError: GPG Failed, see log below:
===== Begin GnuPG log =====
gpg: gpg-agent is not available in this session
gpg: can't query passphrase in batch mode
gpg: Invalid passphrase; please try again ...
gpg: can't query passphrase in batch mode
gpg: Invalid passphrase; please try again ...
gpg: can't query passphrase in batch mode
gpg: encrypted with SANITIZED-bit RSA key, ID SANITIZED, created SANITIZED
"Boyan Penkov SANITIZED"
gpg: public key decryption failed: bad passphrase
gpg: decryption failed: secret key not available
===== End GnuPG log =====

This is quite similar to the one reported here: https://answers.launchpad.net/duplicity/+question/183711 -- however, --use-agent does not fix the problem.

duplicity is 0.6.25, gpg-agent is 2.0.27, and gnupg is 1.4.19. I am on OS X 10.10.2, and all these are installed via homebrew.

edso (ed.so) wrote :

what was your cmd line? did you properly export PASSPHRASE or GPG_AGENT_INFO ?

..ede/duply.net

Boyan Penkov (boyan-penkov) wrote :

I don't use export PASSPHRASE, as I'd prefer it to ask each time. However, I'm unfamiliar with export GPG_AGENT_INFO -- and was not using it! -- should I be writing ~/.gpg-agent-info explicitly?

The command is:
duplicity --ssh-askpass \
   --gpg-options "--compress-algo=bzip2 --bzip2-compress-level=9" \
   --asynchronous-upload \
   --encrypt-key "THEKEY" \
   --verbosity 5 \
   --include /home \
   --include /somethingelse \
   --allow-source-mismatch \
   --exclude '*' \
   source\
   sftp://target/

Artur Bodera (abodera) wrote :

Same here, encrypted full backup resume still broken on 7.04.

I've fixed it by adding an additional check in the password prompting routine:
https://gist.github.com/Thinkscape/981972eb531042a4e627

Changed in duplicity:
importance: Undecided → Medium
milestone: none → 0.7.05
status: New → Fix Committed
Changed in duplicity:
status: Fix Committed → Fix Released
Artur Bodera (abodera) wrote :

Did you also patch the lines for "INCREMENTAL" ?

Yes, of course.

Boyan Penkov (boyan-penkov) wrote :

Works super -- thanks!

To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers

Related questions