Hi! I got following “invalid signature error” on kali linux when trying to update using apt-get update command. Below I list down the working solution for me among various solutions on forums.
Error:
W: GPG error: https://repo.mongodb.org/apt/ubuntu trusty/mongodb-org/3.6 Release: The following signatures were invalid: EXPKEYSIG 58712A2291FA4AD5 MongoDB 3.6 Release Signing Key <packaging@mongodb.com> E: The repository 'https://repo.mongodb.org/apt/ubuntu trusty/mongodb-org/3.6 Release' 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.
Solution:
Use following sequence of commands.
-
sudo rm -rf /var/lib/apt/lists
-
sudo mkdir -p /var/lib/apt/lists/partial
-
sudo apt-get clean
-
sudo apt-get update
“invalid: EXPKEYSIG 58712A2291FA4AD5 MongoDB 3.6 Release Sign” from the error message above.
-
sudo apt-key adv --recv-keys --keyserver keys.gnupg.net 91FA4AD5
-
apt-get update
Console output:
Cheers! 🙂