On Mon, Jul 12, 2010 at 08:30:25AM +0200, Remco Rijnders wrote:
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
> 
> Dear all,
> 
> I have a file encrypted to two different User ID's, both for which I
> have the public keys as well as the secret key. When I try to decrypt
> the file, it always prompts me for the passphrase of user A, while I'd
> like to decrypt it using the passphraseless key of user B.
> 
> I've tried various combinations of -u with and without exclamation mark,
> but without success. How can I specify that the key of user B should be
> used?

A possible workaround would be to create a separate secret keyring that
only contains user B's secret key.  I agree, it's not perfect, and it would
entail explicitly specifying "--no-default-keyring --secret-keyring ..."
and maybe also "--keyring ...".

Alternatively, you could create a different ~/.gnupg/ directory and
symlink all files *but* the secret keyring to your "real" ~/.gnupg/, then
create a minimalistic secret keyring there containing only user B's key.
This would mean setting GNUPG_HOME each time you want to use this keyring,
so it's still not perfect.

It's quite possible that there are simpler ways, I just can't think of them
right now :)

G'luck,
Peter

-- 
Peter Pentchev  [email protected]    [email protected]    [email protected]
PGP key:        http://people.FreeBSD.org/~roam/roam.key.asc
Key fingerprint FDBA FD79 C26F 3C51 C95E  DF9E ED18 B68D 1619 4553
Do you think anybody has ever had *precisely this thought* before?

Attachment: signature.asc
Description: Digital signature

_______________________________________________
Gnupg-users mailing list
[email protected]
http://lists.gnupg.org/mailman/listinfo/gnupg-users

Reply via email to