View Issue Details
|ID||Project||Category||View Status||Date Submitted||Last Update|
|0007875||Kali Linux||[All Projects] Kali Package Bug||public||2022-08-17 20:02||2023-01-12 20:04|
|Target Version||Fixed in Version|
|Summary||0007875: "sudo apt update" fails on fresh WSL2 install from CLI due to invalid signature GPG error|
|Description||Host OS: Windows 10 Pro 21H2|
After a successful WSL2 installation from CLI with the command "wsl --install -d kali-linux" and initial setup, running "sudo apt update" returns the following error:
Get:1 http://kali.download/kali kali-rolling InRelease [30.6 kB]
Err:1 http://kali.download/kali kali-rolling InRelease
The following signatures were invalid: EXPKEYSIG ED444FF07D8D0BF6 Kali Linux Repository <firstname.lastname@example.org>
Fetched 30.6 kB in 1s (37.3 kB/s)
Reading package lists... Done
Building dependency tree
Reading state information... Done
All packages are up to date.
W: An error occurred during the signature verification. The repository is not updated and the previous index files will be used. GPG error: http://kali.download/kali kali-rolling InRelease: The following signatures were invalid: EXPKEYSIG ED444FF07D8D0BF6 Kali Linux Repository <email@example.com>
W: Failed to fetch http://http.kali.org/kali/dists/kali-rolling/InRelease The following signatures were invalid: EXPKEYSIG ED444FF07D8D0BF6 Kali Linux Repository <firstname.lastname@example.org>
W: Some index files failed to download. They have been ignored, or old ones used instead.
Attempting to open Kali Linux from the Microsoft Store (as documented in https://www.kali.org/docs/wsl/win-kex/) after unregistering kali-linux from WSL leads to the same outcome. Updating Kali Linux from the Microsoft Store afterwards also does not work.
Workaround: The update of Kali Linux from the Microsoft Store must be performed before running "wsl --unregister kali-linux" and reopening Kali Linux from the Microsoft Store.
|Steps To Reproduce||1. Update Windows 10 to the latest available version|
2. Install WSL2 as described here (steps 1 to 5): https://docs.microsoft.com/en-us/windows/wsl/install-manual
2. As an administrator run "wsl --install -d kali-linux"
3. Complete the initial user creation process
4. Attempt to run "sudo apt update" using the password set during the previous step
|Additional Information||The manual download option for Kali Linux from Microsoft's WSL2 documentation (https://aka.ms/wsl-kali-linux-new) redirects to a file called "kali-linux-08-06-2019.appx". The stale date may be related to this issue.|
The default WSL distribution, ubuntu, does not have this issue.
That sounds like it's pulling in the wrong release. Assuming it's pulling in a file dated 2019... can you check what /etc/os-release say? I'm gonna guess that it's 2019.3 or something.
You can manually update the key yourself, wget https://http.kali.org/kali/pool/main/k/kali-archive-keyring/<latestkeyringpackage>.deb and then install it with apt install ./kali-archive-keyring*.deb
But I'm kind of surprised that Microsoft is still caching 2019 and passing it along to users. Perhaps we can reach out to them.
Sorry for the delay in response - I failed to notice steev's previous comment somehow.
I just tried downloading https://aka.ms/wsl-kali-linux-new again, and this time I get a different package called KaliLinux_126.96.36.199.AppxBundle signed on August 24th 2022, which matches the current version from the Microsoft Store.
As such, the issue appears to have been resolved, although it may worth waiting the next release to ensure the linked bundle continues to get updated correctly as well.
||Nevermind, I still get KaliLinux_188.8.131.52.AppxBundle from the link above even though the latest version on the Microsoft Store is 184.108.40.206.|
With Microsoft phasing out the native version of WSL in favor of the Microsoft Store version, I'm not sure if this issue should be closed now or not:
|2022-08-17 20:02||debigare||New Issue|
|2022-08-17 22:25||steev||Note Added: 0016590|
|2022-08-24 17:30||steev||Assigned To||=> Gamb1t|
|2022-08-24 17:30||steev||Status||new => assigned|
|2022-08-29 21:27||debigare||Note Added: 0016676|
|2022-12-12 03:26||debigare||Note Added: 0017243|
|2023-01-12 20:04||debigare||Note Added: 0017395|