16th June, 2021 Updated: August 17, 2022

gpg failed to sign the data

After a recent brew update I was unable to commit using git as I had previously set up gpg signing on all my commits.

> git commit
main [3713e57] added
error: gpg failed to sign the data
fatal: failed to write commit object

Fortunately the fix was quite simple. I just needed to give gpg a kick!

gpgconf --kill gpg-agent