The secret key can not be found

I noticed that the encrypted files were being encrypted with the wrong public key from TouchNet. That has been fixed. The user is still having the error that the secret key can not be found. I have attached the error message in Command Prompt.

Gpg4win error.PNG

Hi Matthiew,

it seems you are using an old version of Gpg4win. (This may or may not be related to the problem you are facing, but the old version may have security issue that have been fixed in newer Gpg4win versions.) What version are you using?

Your screenshot shows that GnuPG creates the keyring files in the homedirectory that have been given in the script. This is a sign that files in there were missing, which means GnuPG does not find any keys.

To diagnose further, adding a ā€œ-vā€ should give you more output.
And a
gpg --list-keys
gpg --list-secret-keys
(both adding the same --homedir value should give you an idea which (pub)keys GnuPG finds in that directory.)

Best Regards,