ctaque · 2022-06-30 13:30
I lost the password of my key, so I deleted it now emacs complains when I send a mail via mu4e.
I deleted my entire `~/.gnupg` directory
I regenerated the `~/.authinfo.gpg` key via `epa-encrypt-file`
I receive this message when sending an email :
```
Error while decrypting with "/usr/bin/gpg2":
gpg: encryped with rsa key, identifier 332E4EA69190BEBA gpg: failed to decrypt : No secret key
```
My knowledge in linux and gpg stuff is very limited, what do I need to do ?
[deleted] · 2022-06-30 14:46
[deleted]
ieure · 2022-06-30 15:07
gpg is trying to decrypt a file which is encrypted with the key you deleted, which it can't, because that key isn't in your keyring, because you deleted it.
That you get it when sending an email makes me think that you're either trying to gpg sign the message, or you have a different auth-store for the SMTP password which is still encrypted with the old key.
Run `M-x toggle-debug-on-error` and try sending mail again, then read the stack to see what's most likely. Recursively grep your `.emacs` for mentions of the old key.
ctaque · 2022-07-01 06:24
`toggle-debug-on-error` worked like a charm, I had a authinfo.gpg in \~/.emacs.doom.d/.local/etc/authinfo.gpg that was, I assume, encrypted with the gpg key I deleted. I deleted this key and could send an email again.
ieure · 2022-07-01 15:09
Nice! Glad you got it sorted out.