【发布时间】:2017-02-11 06:11:21
【问题描述】:
当我执行git commit -a -S -m "Commit Message" 时,我收到此错误:
You need a passphrase to unlock the secret key for
user: "Username (Gpg Key) <email-id>"
2048-bit RSA key, ID 2487BE7C, created 2016-10-03
error: gpg failed to sign the data
fatal: failed to write commit object
但是,当我提交时,它甚至不会询问/提示我的密码。那么,在使用 gpg 的 -S 标志时,如何以及在何处输入我的密码?
【问题讨论】:
-
你确定 gpg 可以读取输入吗?如果标准输入已关闭,您将看到上述错误消息。如果 git 命令没有在交互式 shell 中运行,那么您可能需要运行 gpg-agent 才能处理密码输入。
-
@G.Sliepen 请告诉我如何启动它?