Git error - gpg failed to sign data

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

    For me this error started to occur with git tag -s on Debian GNU/Linux when I switched from pinentry-gnome3 to pinentry-curses (using update-alternatives --config pinentry) for easier remote access. It only occurred with git tag -s, not with gpg (e.g. gpg --clearsign) itself.

    The sole change necessary to get it working again in this case was to add export GPG_TTY=$(tty) to my shell startup files.

    I though didn't get the “Inappropriate ioctl for device” error message mentioned as indicator for this fix in another answer to this question.

    Note: Since the cause for getting this error was a completely different one than for those who suggested export GPG_TTY=$(tty) before (usually as a side hint) in other answers to this question, I decided this question needs another answer which mentions that export GPG_TTY=$(tty) may be the main fix and sole thing necessary in some cases.

提交回复
热议问题