GPG error when I want to apt update
8,933
Solution 1
The workaround solution I found is to delete /etc/apt/sources.list.d/microsoft.list
and to make sure the kali repo is uncommented and is inside the main /etc/apt/sources.list
Solution 2
load the key from microsoft
curl https://packages.microsoft.com/keys/microsoft.asc | sudo apt-key add -
Related videos on Youtube
Author by
Yox
Updated on September 18, 2022Comments
-
Yox almost 2 years
I just installed Kali NetHunter and I'm trying to do a simple
apt update
but it looks like a public key is missingroot@kali:~# apt-get update 0% [Waiting for headers] [Connected to packages.microsoft.com (13.8Get:2 https://packages.microsoft.com/repos/microsoft-debian-stretch-prod stretch InRelease [3232 B] Hit:1 http://kali.download/kali kali-rolling InRelease Err:2 https://packages.microsoft.com/repos/microsoft-debian-stretch-prod stretch InRelease The following signatures couldn't be verified because the public key is not available: NO_PUBKEY EB3E94ADBE1229CF Reading package lists... Done W: GPG error: https://packages.microsoft.com/repos/microsoft-debian-stretch-prod stretch InRelease: The following signatures couldn't be verified because the public key is not available: NO_PUBKEY EB3E94ADBE1229CF E: The repository 'https://packages.microsoft.com/repos/microsoft-debian-stretch-prod stretch 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.
I tried
curl -s https://packages.microsoft.com/repos/microsoft-debian-stretch-prod/dists/stretch/Release.gpg | apt-key add -
and
wget --no-check-certificate https://packages.microsoft.com/repos/microsoft-debian-stretch-prod/dists/stretch/Release.gpg | apt-key add -
And the result was
gpg: no valid OpenPGP data found
for both-
Jeff Schaller about 5 yearsHas Kali changed their policy regarding 3rd-party repositories? Last I knew, they only wanted kali.org in the sources.list...
-
Jeff Schaller about 5 yearsSame pubkey error: unix.stackexchange.com/a/479137/117549
-
Yox about 5 yearsThere's nothing else than the kali repo in the
sources.list
but I found amicrosoft.list
inside/etc/apt/sources.list.d/
And I don't think it's the same problem since evencurl -s https://packages.microsoft.com/keys/microsoft.asc |apt-key add -
give me the same resultgpg: no valid OpenPGP data found
-
Sparhawk about 5 years@JeffSchaller You are correct: "Any additional repositories added to the Kali sources.list file will most likely BREAK YOUR KALI LINUX INSTALL."
-
-
U.V. almost 4 yearsto solve a problem remove it??? not really curl packages.microsoft.com/keys/microsoft.asc | sudo apt-key add -
-
AveryFreeman over 3 yearsThis was the first thing I tried after encountering an error when installing the mono-project repo in Ubuntu 20.10, and apparently it was all that was necessary. Thanks