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

前端 未结 30 2064
难免孤独
难免孤独 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:50

    None of the above answers seemed to match my problem. My gpg binary (/usr/local/bin/gpg -> /usr/local/MacGPG2/bin/gpg2) was installed as part of GPG Suite, rather than by brew.

    Nevertheless, I felt that the advice boiled down to: "use whichever gpg binary is the latest available on brew". So I tried:

    brew update
    brew upgrade git
    brew install gpg
    
    # the following are suggestions from brew's Caveats, to make `/usr/local/bin/gpg`
    # point to the brew binary:
    rm '/usr/local/bin/gpg'
    brew link --overwrite gnupg2
    

    I verified that I had correctly changed the gpg upon my $PATH to point to the new executable from brew:

提交回复
热议问题