I met this problem because I had deleted my private key on my laptop in order to protect my secret.
I use gpg2 to solve this problem. Ref: linkgit config --global gpg.program gpg2
And, I also change the signingkey to my key of sign. You can use gpg2 --edit-key [key-id] to see which key is to sign.
Good luck.
BTW. If you want to sign the previous commit, you can use git --amend --signoff
I met this problem because I had deleted my private key on my laptop in order to protect my secret. I use gpg2 to solve this problem. Ref: link
git config --global gpg.program gpg2
And, I also change the signingkey to my key of sign. You can use
gpg2 --edit-key [key-id]
to see which key is to sign.Good luck.
BTW. If you want to sign the previous commit, you can use
git --amend --signoff