Git Hub Desktop on Mac, error: cannot run gpg: No such file or directory

前端 未结 2 668
孤街浪徒
孤街浪徒 2020-12-13 09:03

Trying to commit my changes by using GitHub Desktop and getting this:

error: cannot run gpg: No such file or directory

error: could not ru

2条回答
  •  天涯浪人
    2020-12-13 09:42

    Solved it.

    So as GitHub Desktop was complaining about not being able to find gpg (I had installed it via homebrew), I figured there should be a way to tell git the exact path of gpg, turns out there is:

    gpg.program Use this custom program instead of "gpg" found on $PATH when making or verifying a PGP signature. The program must support the same command-line interface as GPG, namely, to verify a detached signature, "gpg --verify $file - https://git-scm.com/docs/git-config

    So running the following solved the problem:

    git config --global gpg.program $(which gpg)
    

    GitHub got back to me and said that some users also need to use:

    echo "no-tty" >> ~/.gnupg/gpg.conf
    

提交回复
热议问题