【问题标题】:Supply Passphrase in the time of decryption in GPG在 GPG 中解密时提供密码
【发布时间】:2015-03-03 06:44:15
【问题描述】:

虽然我手动使用 gpg,但它工作正常。我在屏幕下方(“解锁密码”)我不想进入这个屏幕意味着我想自动化意味着我想在解密时提供密码。

lqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqk
x Please enter the passphrase to unlock the secret key for the OpenPGP certificate:  x
x "akhilesh (ak) <xxxxxx@xxxxxxx.com>"                                               x
x 2048-bit RSA key, ID EC0BCE3F,                                                     x
x created 2015-03-02 (main key ID 3FA59C97).                                         x
x                                                                                    x
x                                                                                    x
x Passphrase _______________________________________________________________________ x
x                                                                                    x
x            <OK>                                                  <Cancel>          x
mqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqj

【问题讨论】:

  • 删除代码块中的空间无需滚动即可查看整个消息
  • 答案应该是使用 gpg-agent - 正如建议的重复问题的答案所暗示的那样。
  • “我不想要这个屏幕意味着我想要自动化意味着我想要在解密时提供密码。”什么?

标签: linux gnupg gpgme


【解决方案1】:

要在解密时指定密码,请使用标志--passphrase &lt;your passphrase&gt;--batch(gpg2 需要批处理)

例子:

gpg2 --batch --passphrase mypassphrase -a -d my_encrypted_file

【讨论】:

    最近更新 更多