【问题标题】:GPG Ignores --passphrase parameterGPG 忽略 --passphrase 参数
【发布时间】:2018-01-12 02:20:49
【问题描述】:

如何通过 GPG 命令行传递密码?即使使用了“--passphrase”参数,GNOME 代理仍然会弹出。

人们建议使用“--no-agent”,但这不是一个有效的选项。您可能可以通过配置文件进行设置,但这对我来说不是一个有效的方法。我不能使用管道,因为我将在 STDIN 上有数据。

【问题讨论】:

    标签: gnupg


    【解决方案1】:

    它是“--no-use-agent”:

    $ echo "cleartext" | gpg --passphrase "some-passphrase" -c --no-use-agent > text.encrypted
    $ cat text.encrypted | gpg --passphrase "passphrase" --no-use-agent 2>/dev/null
    $ cat text.encrypted | gpg --passphrase "some-passphrase" --no-use-agent 2>/dev/null
    cleartext
    

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2011-07-03
      • 2011-12-01
      • 2016-04-21
      • 2013-06-14
      • 2015-05-13
      相关资源
      最近更新 更多