I get this terminal error about every three to six months:
error: gpg failed to sign the data fatal: failed to write commit object When I see it I think “I really should have written down the problem last time”. So here we are, ready and willing to document.
The issue for me is that I set short expiration times for my gpg keys.
To verify my key is expired I run: $ gpg -K --keyid-format SHORT and get results like below:
I don’t recall the circumstances that lead to the issue but anytime I tried to open vim for git I received:
“There was a problem with the editor vi”
The solution:
git config --global core.editor /usr/local/bin/vim