gpg —list-keys 命令在将私钥导入全新安装后输出 uid

gpg —list-keys 命令在将私钥导入全新安装后输出 uid

我全新安装了 Arch Linux 并导入了备份的 gpg 私钥。作为健全性检查,我运行了:

gpg —list-keys

一切都显示正常,除了uid现在显示的内容:

uid [ unknown ] User < [email protected] >

当我在全新安装之前第一次创建此密钥时,它显示:

uid [ ultimate ] User < [email protected] >

为什么导入全新安装后它会从 变为[ ultimate ][ unknown ]

提前致谢。

答案1

GNUPG 有一个信任数据库存储在~/.gnupg/trustdb.gpg

您可以使用以下选项备份此信任数据库--export-ownertrust

gpg --export-ownertrust > file.txt

如果您导出密钥并稍后将其导入到新环境中,则信任数据库将不再存在。

然而,这很容易解决:

gpg --edit-key [email protected]

gpg> trust

Please decide how far you trust this user to correctly verify other users' keys
(by looking at passports, checking fingerprints from different sources, etc.)

  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

Your decision? 5

不要忘记保存更改:

gpg> save

阅读有关信任的内容级别价值观。例如未知 对于密钥签名中所有者的判断一无所知。您的公钥环上最初不属于您的密钥具有此信任级别

相关内容