首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >gpg -gpg-预设-密码安装

gpg -gpg-预设-密码安装
EN

Unix & Linux用户
提问于 2019-04-12 20:55:48
回答 3查看 2.7K关注 0票数 3

问题:当我传递show <name of credential>时,密码是反复被请求的。

做一些谷歌搜索,我发现你可以用gpg预设的密码来做,但是我不知道从哪里得到它,或者它是否包含在gpg发行版中。

这是我正在运行的gpg的当前版本。

有人知道如何安装gpg预置密码吗?

代码语言:javascript
复制
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
EN

回答 3

Unix & Linux用户

回答已采纳

发布于 2019-04-13 00:42:55

看起来它是安装好的,只是不能通过gpg-preset-passphrase命令直接访问,而是:/usr/libexec/gpg-preset-passphrase

代码语言:javascript
复制
/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.
票数 10
EN

Unix & Linux用户

发布于 2022-07-21 10:17:15

最兼容的方法是像这样使用gpgconf --list-dirs libexecdir

代码语言:javascript
复制
"$(gpgconf --list-dirs libexecdir)"/gpg-preset-passphrase --present

我已经在macOS和ubuntu18.04上测试了这一点,文件夹设置为:

  • 关于macOS:/opt/homebrew/Cellar/gnupg/2.3.7_1/libexec
  • ubuntu:/usr/lib/gnupg

记住要使用预设,您需要将allow-preset-passphrase\添加到.gnupg/gpg-agent.conf中。将默认的2h存储时间更改为更大的存储时间也是有用的,代理配置选项是:

代码语言:javascript
复制
max-cache-ttl 34560000 
max-cache-ttl-ssh 34560000 
票数 6
EN

Unix & Linux用户

发布于 2019-04-19 20:00:32

在我的Ubuntu 16安装上,它在gnupg-agent包中,并放置在/usr/lib/gnupg2/gpg-preset-passphrase中。

票数 2
EN
页面原文内容由Unix & Linux提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://unix.stackexchange.com/questions/512173

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档