返回博客

Git GPG 重置与错误修复

解决 Git 提交签名后出现的错误,例如'error: unsupported value for gpg.format: ssh'和'Git err:gpg failed to sign the data'。文章提供了解决方案,包括重置 Git GPG 配置的命令,帮助你修复 Git 签名相关的故障。

Mt.r
|

自从设置了 git 提交签名,出了一堆问题

error: unsupported value for gpg.format: ssh

'git log' failed with code 128:'error: unsupported value for gpg.format: ssh fatal: bad config variable 'gpg.format' in file '/Users/maotianrun/.gitconfig' at line 25

Git err:gpg failed to sign the data; fatal:failed to write commit object
git config --global --unset gpg.program
git config --global --unset user.signingkey
git config --global --unset commit.gpgsign
git config --global --unset gpg.format
git config commit.gpgsign false
git config --global commit.gpgsign false