Git error - gpg failed to sign data

前端 未结 26 1468
遇见更好的自我
遇见更好的自我 2020-12-07 07:19

I just started using git and I install git and gpg via homebrew. For some reason, I get this error when i do git commit I looked at so many other stackoverflow

26条回答
  •  温柔的废话
    2020-12-07 07:37

    In my case, I had mixed gpg configuration and smimesign configuration given in the commit signing documentation here: https://help.github.com/en/github/authenticating-to-github/telling-git-about-your-signing-key

    After working on it for hours, I found the best way to correct it was unset everything related to gpg, and reconfiguring gpg.

    As mentioned in @Jason Thrasher's answer, find all the git config related to gpg using:

    git config -l | grep gpg
    

    Then unset everything golablly as well as locally using:

    git config --global --unset 
    git config --local --unset 
    

    Then reconfigure following the official documentation given above. Hope this helps.

提交回复
热议问题