Git error - gpg failed to sign data
<p>I just started using git and I install git and gpg via homebrew.
For some reason, I get this error when i do <code>git commit</code>
I looked at so many other stackoverflow questions regarding this topic and none of them worked for me.
How can I fix this error so that I can upload successfully. </p>

<pre><code>error: gpg failed to sign the data
fatal: failed to write commit object
</code></pre>