I just started using git and I install git and gpg via homebrew.
For some reason, I get this error when i do git commit
I looked at so many other stackoverflow
In my case, I had mixed gpg configuration and smimesign configuration given in the commit signing documentation here: https://help.github.com/en/github/authenticating-to-github/telling-git-about-your-signing-key
After working on it for hours, I found the best way to correct it was unset everything related to gpg, and reconfiguring gpg.
As mentioned in @Jason Thrasher's answer, find all the git config related to gpg using:
git config -l | grep gpg
Then unset everything golablly as well as locally using:
git config --global --unset
git config --local --unset
Then reconfigure following the official documentation given above. Hope this helps.