GnuPG broken

After the complete reinstallation of my system (host + VMs), I could not use any key management tool (import, export, create…) in Whonix workstation, both from the command line (gpg) or the GUI (KGpg or OpenPGP).

Consistent error: ‘/home/user/.gnupg/trustdb.gpg: invalid trustdb’. The file was empty.

The workaround was to install enigmail in the host and create a key. The .gnupg folder was created and copied in the VM.

Can’t reproduce this at the moment.

After importing a fresh 8.2 workstation, the /home/user/.gnupg folder only contains gpg.conf. No other files.

I tested “gpg --gen-key” and gpg --serach-keys … Downloaded some key. Worked. Trustdb was created. No errors.

Please post what command was failing for you. I need an example.

If worse comes to worst, most likely just /home/user/.gnupg/gpg.conf might be broken. Unlikely, because during the build process it runs “sudo -u user gpg --gpgconf-test”.