将私钥导入干净安装后,gpg —list-keys命令输出uid [未知]


21

我干净安装了Arch Linux,然后导入了备份的gpg私钥。作为健全性检查,我跑了:

gpg —list-keys

一切正常显示,但uid现在显示为:

uid [ unknown ] User < user@useremail.com >

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

uid [ ultimate ] User < user@useremail.com >

为什么会从改变[ ultimate ][ unknown ]其导入到一个干净的安装后?

提前致谢。

Answers:


30

GNUPG的信任数据库存储在 ~/.gnupg/trustdb.gpg

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

gpg --export-ownertrust > file.txt

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

但是,这很容易解决:

gpg --edit-key user@useremail.com

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

我不断收到`gpg:无法以批处理模式执行此操作
Tim Siwula
By using our site, you acknowledge that you have read and understand our Cookie Policy and Privacy Policy.
Licensed under cc by-sa 3.0 with attribution required.