gnupg - 选择在执行 gpg --encrypt --sign 时使用哪个 key

标签 gnupg

我的 GPG key 环中有多个 key 。

我想做一个 gpg -e -s -a对输出进行加密、签名和 ascii 装甲。但是,我还需要通过 key ID 指定用于签名的 key 。

最佳答案

我需要 --local-user 选项。

gpg -e -s -a --local-user 0xDEADBEEF -r 0x01234567

关于gnupg - 选择在执行 gpg --encrypt --sign 时使用哪个 key ,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/9624384/

相关文章:

python - gpg --passphrase-fd 不适用于 python 3 子进程

使用多个 key 加密/解密

encryption - 对 gpg 使用 expect 脚本 - 密码解密 - 不起作用

Git 签名提交 - 如何抑制 "You need a passphrase to unlock the secret key..."

gnupg - 无法登录 git-crypt,因为 .gnupg/pubring.kbx 文件困惑

centos - 无需任何交互即可生成 gpg 公钥和私钥

github - 如何在 github 操作中使用 GPG key ?

git - `git -S -m commit` 请求密码失败 — 从 GPG mac 移动到 GPG shell 后签名

bash - 抑制 gnupg 中的警告消息

python - 将 PGP 公钥 block 导入为字符串 : working in shell but not in python-gnupg