Git error - gpg failed to sign data

前端 未结 26 1459
遇见更好的自我
遇见更好的自我 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:36

    Git needs to know which key it is signing with.

    After you have setup GPG, gpg-agent, and your gpg.conf files (see this guide), you need to run

    git config --global user.signingkey EB11C755
    

    Obviously, replace the public key at the end with your own. If you want every commit to be signed by default, use

    git config --global commit.gpgsign true
    

提交回复
热议问题