I recently started running into an issue when trying to push commits to git. The error was as follows.
error: cannot run gpg: No such file or directory
error: could not run gpg.
fatal: failed to write commit object
It seems as though a recent update messaged up my whole Git/GPG setup. After a little bit of research, I was able to resolve this with the following command.
git config --global gpg.program $(which gpg)