Make a backup of .gnupg with like rsync!
Then:
gpg --import ~/.gnupg/secring.gpg
should fix this for you
Also you want to migrate the rest of the stuff to the new storage
format, i.e.:
cd ~/.gnupg
gpg --export-ownertrust >otrust.lst
mv pubring.gpg publickeys
gpg --import-options
WRT eoan/focal, d'oh. Sorry. Yes, indeed, focal is my focus.
~$ echo $GPG_AGENT_INFO
/run/user/1001/gnupg/S.gpg-agent:0:1
~$ gpg1 --list-secret-keys
Command 'gpg1' not found, but can be installed with:
sudo apt install gnupg1
~$ sudo apt install gnupg1
[...]
~$ gpg1 --list-secret-keys
Normally, gpg2 does a one time migration of keyrings from v1 format to
v2 format, and also most recent gpg2 no longer reads/loads private keys
directly and only via gnupg-agent.
Also, if one ever run gpg2 on a gpg1 directory, the migration of keys
happened and if one adds any new private keys
** Summary changed:
- gpg in eoan doesn't find my private keys
+ gpg in focal doesn't find my private keys
--
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/1862430
Title:
gpg in focal doesn't find my
** Description changed:
- I recently upgraded to eoan, and gpg can no longer find my secret keys:
+ I recently upgraded to focal, and gpg can no longer find my secret keys:
- ~$ gpg --list-secret-keys
- ~$
+ ~$ gpg --list-secret-keys
+ ~$
attached is the output of 'strace -e