Decryption fails due to key ownership

Hello,

I am running GnuPG 2.4.6 on Mac OS Sonoma 14.7.
When I encrypt a file to my own key and then I try to decrypt it, I get this error: “you are not in possession of the key required to decrypt the selected file. The file is only encrypted to keys with the following fingerprints:” where the fingerprint is the fingerprint of the subway that is associated with my sec/pub key pair.

Encrypting/Decrypting used to work fine, but this morning the following happened:

  1. I tried to encrypt a file and got the “expired key” message, so I chose to extend its life
  2. I encrypted and decrypted the file, and it worked, but I realized that gpg did not ask for the password
  3. I opened the Mac system password wallet and found a couple of entries, that were related to gnupg, and deleted them (I found only later that this should be done from the gnupg tool in System Preferences)
  4. I revoked and removed my key pair and generated a new one. After doing so, I always get the above error.

I reinstalled gnupg, rebooted my Mac multiple times, deleted the key I generated in the morning and generated a new pair, but the result is always the same, I can encrypt (my key is the only key in the keyring and it is selected and added to recipients) but I cannot decrypt.

Any help will be greatly appreciated

Thank you
Stefano Barni

SOLVED

Running the uninstall program that comes with the .dmg file at this link:

and then reinstalling with the install tool solved the issue.

1 Like