问题:当我传递show <name of credential>时,密码是反复被请求的。
做一些谷歌搜索,我发现你可以用gpg预设的密码来做,但是我不知道从哪里得到它,或者它是否包含在gpg发行版中。
这是我正在运行的gpg的当前版本。
有人知道如何安装gpg预置密码吗?
gpg --version
gpg (GnuPG) 2.0.22
libgcrypt 1.5.3
Copyright (C) 2013 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.
Home: ~/.gnupg
Supported algorithms:
Pubkey: RSA, ?, ?, ELG, DSA
Cipher: IDEA, 3DES, CAST5, BLOWFISH, AES, AES192, AES256, TWOFISH,
CAMELLIA128, CAMELLIA192, CAMELLIA256
Hash: MD5, SHA1, RIPEMD160, SHA256, SHA384, SHA512, SHA224
Compression: Uncompressed, ZIP, ZLIB, BZIP2发布于 2019-04-13 00:42:55
看起来它是安装好的,只是不能通过gpg-preset-passphrase命令直接访问,而是:/usr/libexec/gpg-preset-passphrase:
/usr/libexec/gpg-preset-passphrase --version
gpg-preset-passphrase (GnuPG) 2.0.22
Copyright (C) 2013 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.发布于 2022-07-21 10:17:15
最兼容的方法是像这样使用gpgconf --list-dirs libexecdir:
"$(gpgconf --list-dirs libexecdir)"/gpg-preset-passphrase --present我已经在macOS和ubuntu18.04上测试了这一点,文件夹设置为:
/opt/homebrew/Cellar/gnupg/2.3.7_1/libexec/usr/lib/gnupg记住要使用预设,您需要将allow-preset-passphrase\添加到.gnupg/gpg-agent.conf中。将默认的2h存储时间更改为更大的存储时间也是有用的,代理配置选项是:
max-cache-ttl 34560000
max-cache-ttl-ssh 34560000 发布于 2019-04-19 20:00:32
在我的Ubuntu 16安装上,它在gnupg-agent包中,并放置在/usr/lib/gnupg2/gpg-preset-passphrase中。
https://unix.stackexchange.com/questions/512173
复制相似问题