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

閱讀有關信任的內容等級價值觀。例如未知 對於金鑰簽章中擁有者的判斷一無所知。您的公鑰環上最初不屬於您的密鑰具有此信任級別

相關內容