Comment 3 for bug 1680682

Revision history for this message
Kenneth Loafman (kenneth-loafman) wrote : Re: [Bug 1680682] Re: --use-agent broken in 0.7.12

OK, good start, but it looks like it's a bit more complex. I'm seeing a
matrix of choices,

Top - gpg 1.x, gpg 2.0x, gpg 2.1x
Side - use-agent, env-password, stdin-isatty

Unless I'm mistaken, that's 9 possible environments, with some not being
valid like use-agent and env-password together.

Can you think of more options along the side?

On Fri, Apr 7, 2017 at 6:29 PM, Dave Allan <email address hidden>
wrote:

> re: 1) no changes to repo, ok, I see what I did, I built bzr revision
> 1190; ignore my comment about its being fixed in bzr. All comments
> below refer to 0.7.12 built from
> https://launchpad.net/duplicity/0.7-series/0.7.12/+
> download/duplicity-0.7.12.tar.gz
>
> To confirm: I did uninstall the distro version. I've also removed the
> version I built from bzr.
>
> re: 2) right, I was aware gpg2 always uses the agent. The comment at
> gpg.py line 141:
>
> # This forces gpg2 to ignore the agent.
>
> suggests that the intent was to make gpg2 ignore the agent. However, in
> my case, I want gpg2 to use the agent as I always have.
>
> re: 3) $ gpg2 --version
> gpg (GnuPG) 2.1.13
> libgcrypt 1.6.6
>
> In investigating today, I found that this is 100% reproducible as I
> first thought, but it requres a little more setup than I thought. I
> only see the error if gpg-agent has not cached my passphrase: if a
> backup succeeds because I use an older version or a patched 0.7.12, then
> unpatched 0.7.12 also succeeds until gpg-agent no longer has my
> passphrase. To reproduce it, the gpg-agent can be forced to forget the
> passphrase with:
>
> echo RELOADAGENT | gpg-connect-agent
>
> I've attached a patch that makes things work as I expect on my system.
> Let me know what you think.
>
> ** Patch added: "RFC patch"
> https://bugs.launchpad.net/duplicity/+bug/1680682/+
> attachment/4857813/+files/gpg-use-agent.patch
>
> --
> You received this bug notification because you are a bug assignee.
> https://bugs.launchpad.net/bugs/1680682
>
> Title:
> --use-agent broken in 0.7.12
>
> Status in Duplicity:
> In Progress
>
> Bug description:
> I've been using gpg2 with --use-agent successfully for a long time,
> but after updating to 0.7.12 my backups started failing with the
> error:
>
> GPGError: GPG Failed, see log below:
> ===== Begin GnuPG log =====
> gpg: Sorry, we are in batchmode - can't get input
> ===== End GnuPG log =====
>
> It seems like the attempt to create truly non-interactive behavior
> (gpg.py at line 140) is causing it to ignore --use-agent.
>
> This seems to be fixed in the most recent code in bzr.
>
> To manage notifications about this bug go to:
> https://bugs.launchpad.net/duplicity/+bug/1680682/+subscriptions
>