在使用 goland 的 git 尝试提交时会出现如下错误
error: gpg failed to sign the data:
[GNUPG:] KEY_CONSIDERED ...... 2
[GNUPG:] BEGIN_SIGNING H10
[GNUPG:] PINENTRY_LAUNCHED 1401 gnome3:curses 1.2.1 - xterm-256color :0.0 - 1000/1000 -
gpg: signing failed: Inappropriate ioctl for device
[GNUPG:] FAILURE sign 83918950
gpg: signing failed: Inappropriate ioctl for device
fatal: failed to write commit object
因为配置了 GPG 签名,commit 时要输入 GPG 密钥的密码,网上查找错误,都让配置export GPG_TTY=($tty),我把这个加到了~/.zshrc,但使用 goland 提交时还是会这样
我在 goland 的 terminal 手动 git commit 时能够正常弹出
