问题描述
我一直在设置我的开发环境,所以当我创建一个提交时,它会被GPG自动签名。我在这里关注了Githubs关于此问题的文档:。
I have been working on setting up my development environment, so when I create a commit it is automatically signed by GPG. I followed Githubs documentation on the matter here: https://help.github.com/categories/gpg/.
我试图使用IntelliJ的git接口来创建一个提交,但它总是失败,出现这个错误。
I am attempting to use IntelliJ's git interface to create a commit, but it always fails with this error.
gpg: cannot open `/dev/tty`: Device not configured
error: gpg failed to sign the data
fatal: failed to write commit object
直接使用git时不会遇到此错误从我的终端,我发现了一个问题,其中有人遇到类似的问题(使用源代码树),并提到了一些关于GUI没有弹出来输入密码的问题。我假设这与此问题类似。
I do not encounter this error when using git directly from my terminal, I discovered an issue where someone had a similar problem (with Source Tree) and mentioned something about the GUI not popping up to enter passphrase. I'm assuming this is similar to that issue.
我该如何解决这个问题?
How can I go about fixing this issue?
推荐答案
将GPG配置为允许通过向 gpg.conf
添加以下内容来远程调用它:
Configure GPG to allow it to be called from a program remotely by adding the following to your gpg.conf
:
no-tty
这篇关于IntelliJ在尝试签名提交时未能提交更改(GPG)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!