migration by copy of ~/.gnupg not working
Ingo Klöcker
kloecker at kde.org
Fri Jun 4 09:33:35 CEST 2021
On Donnerstag, 3. Juni 2021 19:50:17 CEST Herr Saalfeld via Gnupg-users wrote:
> Hi,
>
> I though migrating my user GPG configuration onto a new computer should
> be as simple as making a full copy of ~/.gnupg with rsync
>
> rsync -av old:/home/me/.gnupg /home/me/
I would have expected the same.
> However, on the new computer, I see nothing when I call
>
> gpg -k
>
> So I checked for differences
>
> gpg --version on the new computer prints
>
> gpg (GnuPG) 2.2.20
> libgcrypt 1.8.7
[snip]
> Home: /home/me/.gnupg
[snip]
>
> on the old computer, it is almost the same
>
> gpg (GnuPG) 2.2.20
> libgcrypt 1.8.5
[snip]
> Home: /home/me/.gnupg
[snip]
>
> The directory content on both machines is
>
> $ ls -al ~/.gnupg
> total 152
> drwx------ 4 me me 4096 Jun 3 13:41 .
> drwxr-xr-x 93 me me 4096 Jun 3 11:55 ..
> drwx------ 2 me me 4096 Dec 22 2017 crls.d
> -rw------- 1 me me 9400 Feb 25 2016 gpg.conf
> -rw-r--r-- 1 me me 0 Aug 2 2016 .gpg-v21-migrated
This file indicates that in the past gpg did (try) a migration of the old key
storage to the new key storage.
> drwx------ 2 me me 4096 Aug 30 2019 private-keys-v1.d
This folder is the new storage location for your private keys.
> -rw------- 1 me me 31836 Apr 8 21:51 pubring.gpg
This is the old public keyring file.
> -rw------- 1 me me 32 Jun 3 11:30 pubring.kbx
This is the new public keyring file. It is suspiciously small.
> -rw------- 1 me me 600 Apr 15 11:24 random_seed
> -rw------- 1 me me 2582 Feb 25 2016 secring.gpg
This is the old private/secret keyring file.
> -rw-r--r-- 1 me me 49152 Oct 17 2019 tofu.db
> -rw------- 1 me me 2040 Oct 17 2019 trustdb.gpg
>
>
> Can anybody help me out here?
Try the following:
a) Terminate all running background processes/daemons of gpg
gpgconf --kill all
b) Remove the migration indicator file
rm ~/.gnupg/.gpg-v21-migrated
c) List the public keys
gpg -k
If this doesn't fix the problem, then do the migration manually by importing
the old public keyring and the old secret keyring:
gpg --import ~/.gnupg/pubring.gpg
gpg --import ~/.gnupg/secring.gpg
Regards,
Ingo
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 195 bytes
Desc: This is a digitally signed message part.
URL: <https://lists.gnupg.org/pipermail/gnupg-users/attachments/20210604/713917be/attachment.sig>
More information about the Gnupg-users
mailing list