Re: [SOLVED] gpg doesn't import secret keys for me any more

2019-01-15 Thread Daniel Kahn Gillmor
On Tue 2019-01-15 12:05:39 -0500, Ineiev wrote:
> On Mon, Jan 14, 2019 at 03:06:22PM -0500, Daniel Kahn Gillmor wrote:
>> fwiw, if you use --batch with --import, there will be no attempt to use
>> pinentry, ever, which should make both commands work without complaint.
>
> Curiously, when I --export-secret-keys with --batch, it still requests
> the password.

right, that's a requirement for most secret keys, because the secret
keys need to be re-encrypted into the OpenPGP-style export format.  The
standard locked form of the secret keys stored in
~/.gnupg/private-keys-v1.d is not compatible directly with the OpenPGP
secret key specification, so decryption and re-encryption is needed.

otoh, --batch can work with --import because of a special case, where
GnuPG is willing to (temporarily at least) just store the
OpenPGP-wrapped secret key in private-keys-v1.d/ without converting it
to the standard locked form.

--dkg


signature.asc
Description: PGP signature
___
Gnupg-users mailing list
Gnupg-users@gnupg.org
http://lists.gnupg.org/mailman/listinfo/gnupg-users


Re: [SOLVED] gpg doesn't import secret keys for me any more

2019-01-15 Thread Ineiev
On Mon, Jan 14, 2019 at 03:06:22PM -0500, Daniel Kahn Gillmor wrote:
> On Sat 2019-01-12 14:25:02 -0500, Ineiev wrote:
> > On Sat, Jan 12, 2019 at 02:12:47PM -0500, Ineiev wrote:
> >> dti@manas:~$ gpg --home h1 --import  >
> > Sorry, this is what works:
> >
> > gpg --home h1 --import sec.asc
> 
> to be clear, i think the issue that you were having is that both
> commands use pinentry-tty, but the former command has stdin coming from
> the redirected file, not the tty.

Indeed, with pinentry-gtk-2, it works both ways.

> fwiw, if you use --batch with --import, there will be no attempt to use
> pinentry, ever, which should make both commands work without complaint.

Curiously, when I --export-secret-keys with --batch, it still requests
the password.


signature.asc
Description: Digital signature
___
Gnupg-users mailing list
Gnupg-users@gnupg.org
http://lists.gnupg.org/mailman/listinfo/gnupg-users