Kali apt-get update fails with GPG error

root@kali:~# apt-get update
Get:1 http://kali.cs.nctu.edu.tw/kali kali-rolling InRelease [30.6 kB]
Err:1 http://kali.cs.nctu.edu.tw/kali kali-rolling InRelease
The following signatures were invalid: EXPKEYSIG ED444FF07D8D0BF6 Kali Linux Repository <[email protected]>
Reading package lists... Done
W: GPG error: http://kali.cs.nctu.edu.tw/kali kali-rolling InRelease: The following signatures were invalid: EXPKEYSIG ED444FF07D8D0BF6 Kali Linux Repository <[email protected]>
E: The repository 'http://http.kali.org/kali kali-rolling InRelease' is not signed.
N: Updating from such a repository can't be done securely, and is therefore disabled by default.
N: See apt-secure(8) manpage for repository creation and user configuration details.
root@kali:~# wget https://http.kali.org/kali/pool/main/k/kali-archive-keyring/kali-archive-keyring_2020.2_all.deb
--2021-12-26 00:22:44-- https://http.kali.org/kali/pool/main/k/kali-archive-keyring/kali-archive-keyring_2020.2_all.deb
Resolving http.kali.org (http.kali.org)... 192.99.200.113
Connecting to http.kali.org (http.kali.org)|192.99.200.113|:443... connected.
ERROR: The certificate of ‘http.kali.org’ is not trusted.
ERROR: The certificate of ‘http.kali.org’ has expired.


使用舊版本的kali進行apt-get update 跳出錯誤,從錯誤訊息得知

GPG密鑰已經更改了,可以透過pkg 新的 GPG密鑰來處理,只要到kali的keyring下載”最新”的key-s文件下載

http.kali.org/kali/pool/main/k/kali-archive-keyring

假如當前最新版本是kali-archive-keyring_2020.2_all.deb

wget https://http.kali.org/kali/pool/main/k/kali-archive-keyring/kali-archive-keyring_2020.2_all.deb

如果你跟我一樣有噴出錯誤訊息,可以透過瀏覽器將最新的下載到你的機器裡面,pkg它就可以解決問題囉!

pkg -i kali-archive-keyring_2020.2_all.deb

發佈留言

發佈留言必須填寫的電子郵件地址不會公開。 必填欄位標示為 *