Git error - gpg failed to sign data

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

    Somehow your git is configured to GPG sign every commit. Signing with GPG isn't required to commit or push using git. It's likely giving the error because your gpg signing mechanism isn't configured yet.

    If you're new to git, try to get it working first without GPG signing at first, then add signing in later if you really need it.

    You can verify how your git is configured with regards to gpg by doing:

    git config -l | grep gpg
    

    Which may produce zero or more lines, including:

    commit.gpgsign=true
    

    If "commit.gpgsign" is true, then you have gpg signing enabled. Disable it with:

    git config --global --unset commit.gpgsign
    

    Then try to run your commit again. It should now run without gpg signing. After you get the basic git working, then you should try adding gpg signing back to the mix.

提交回复
热议问题