gnupg:无法保证此密钥属于指定用户

gnupg: There is no assurance this key belongs to the named user

我正在尝试使用有趣的密码管理 tool named Pass。

我做了以下事情:

  1. 已安装 gpg 工具$ sudo dnf install gpg
  2. 使用 $ gpg --gen-key
  3. 生成了一个密钥
  4. 按说明输入 $ pass init "foobar id of my gpg key" here
  5. 得到

mkdir: created directory ‘/home/chichivica/.password-store/’ Password store initialized for foobar@email.com

  1. 尝试添加简单密码

$ pass insert foo Enter password for foo: Retype password for foo:

  1. 问题来了

gpg: A45A123C: There is no assurance this key belongs to the named user gpg: [stdin]: encryption failed: Unusable public key

谁能给我一些建议?

将我的密钥对从一台机器复制到另一台机器后,我遇到了同样的问题。我的解决方案是设置密钥的信任级别:

gpg --edit-key <KEY_ID>
gpg> trust

您将被要求 select 来自以下的信任级别:

1 = I don't know or won't say
2 = I do NOT trust
3 = I trust marginally
4 = I trust fully
5 = I trust ultimately
m = back to the main menu

我 selected 5 因为我创建了密钥所以我当然最终相信它 :)。它会要求您确认您的决定:

Your decision? 5
Do you really want to set this key to ultimate trust? (y/N) y

确认后退出:

gpg> quit

然后您应该能够使用该密钥进行加密。