Transfer subkey to other keyring
Jack Bates
di44vq at nottheoilrig.com
Wed Jun 26 20:00:40 CEST 2013
On 26/06/13 02:30 AM, Werner Koch wrote:
> On Tue, 25 Jun 2013 20:12, di44vq at nottheoilrig.com said:
>> Hello, I want to transfer a subkey from one keyring to another, but I
>> get the following error:
>
> Do you want to put a subkey under a different primary key? There are no
> command line options for that. Recall that a subkey is bound by a key
> signature to the primary key.
>
> With the development version (2.1) it is possible to add a subkey using
> any existing key: Use "gpg2 --edit-key", "addkey", select "(13) Existing
> key", and enter the keygrip. To view all keygrip run
> "gpg2 --with-keygrip -K".
Thanks Werner, I want to keep my primary key on a separate keyring (does
this require putting subkeys under a different primary key?)
Here are the steps I followed:
# Generate primary key (I will use "--homedir a" and "--homedir b"
for clarity, thanks Henry)
$ gpg --homedir a --gen-key
# Add subkey
$ gpg --homedir a --edit-key . addkey
# Transfer subkey to other keyring
$ gpg --homedir a --export-options export-reset-subkey-passwd
--export-secret-subkeys FAC3301A\! | gpg --homedir b --import
# Add another subkey
$ gpg --homedir a --edit-key . addkey
# Transfer subkey to other keyring
$ gpg --homedir a --export-options export-reset-subkey-passwd
--export-secret-subkeys 10D03493\! | gpg --homedir b --import-options
merge-only --import
gpg: key 7FABB65F: already in secret keyring
gpg: Total number processed: 1
gpg: secret keys read: 1
gpg: secret keys unchanged: 1
My version is 1.4.12
More information about the Gnupg-users
mailing list