gpg failed to sign the data fatal: failed to write commit object [Git 2.10.0]

前端 未结 30 2095
难免孤独
难免孤独 2020-11-27 23:55

I followed few articles over the pretty attributes on Git 2.10 release note. Going through which upgraded the git to 2.10.0 and made changes to global .gitconfig

30条回答
  •  北荒
    北荒 (楼主)
    2020-11-28 00:47

    I've DONE it through this short and easy recipe:

    Auto-sign commits on macOS (Globally and with different IDEs):

    Get your signingkey in this way.

    brew install gnupg gnupg2 pinentry-mac
    git config --global user.signingkey 
    git config --global commit.gpgsign true
    git config --global gpg.program gpg
    

    Put the following in gpg.conf file (edit file with nano ~/.gnupg/gpg.conf command):

    no-tty
    

    Put the following in gpg-agent.conf file (edit file with nano ~/.gnupg/gpg-agent.conf command):

    pinentry-program /usr/local/bin/pinentry-mac
    

    Update:

    You might need to execute killall gpg-agent command after editing the configurations file, gpg.conf, according to the comments. As the self-explanatory command says, this command will terminate the GPG (Gnu Privacy Guard) agent.

提交回复
热议问题