I recently move from debian to Arch. Before wiping my disk, I did a backup of my ~/.gnupg folder.
I've restored it, but now gpg --list-secret-keys doesn't show anything even if my keys are here:
$ ls -l ~/.gnupg/private-keys-v1.d/
total 16
-rw------- 1 me me 423 19 aug 02:34 1BExxx.key
-rw------- 1 me me 423 19 aug 02:34 310xxx.key
-rw------- 1 me me 423 19 aug 02:34 829xxx.key
-rw------- 1 me me 430 19 aug 02:34 D98xxx.key
Have I just lost my gpgkeys ? Or am I missing something here ?
Thanks
~/.gnupgand~/.gnupg/private-keys-v1.d/directories? They need to be 700 (drwx------). BTW, you can recursively check the perms, owner, and group on everything under ~/.gnupg in one command withfind ~/.gnupg/ -exec stat -c '%a %A %U %G %n' {} +. Files should be 600 (-rw-------), directories 700. owned by your user and your group. Or justfind ~/.gnupg/ -lsif you don't need to see the octal permissions. This is assuming GNU find and GNU stat, other versions are different.700and all files600. And I've also double check the owner with achown -R $(whoami):$(whoami) ~/.gnupg.--export-secret-keyson the old and--importon the new