4

After installing MS VS Code and doing sudo apt update. an error appeared.

Err:4 https://packages.microsoft.com/repos/code stable InRelease                                                      
  The following signatures couldn't be verified because the public key is not available: NO_PUBKEY EB3E94ADBE1229CF

after reading package lists, there is a follow up GPG Error

W: GPG error: https://packages.microsoft.com/repos/code stable 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/code stable 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.

So far I am using vscode with no issues and vscode is running fine with Python and a few other languages. I can say it didn't affect the software/application itself. However I still find the error a bit annoying when doing sudo apt-get update. Is there anyway to solve this or at least remove this error from coming up every time I do sudo apt-get update?

other additional information:

OS: Ubuntu 22.04.1 LTS x86_64 Jammy Jellyfish

Shell: bash 5.1.16

1 Answer 1

0

You can re-signing the key with this commands:

wget -qO- https://packages.microsoft.com/keys/microsoft.asc | gpg --dearmor > packages.microsoft.gpg
sudo install -D -o root -g root -m 644 packages.microsoft.gpg /etc/apt/keyrings/packages.microsoft.gpg
rm -f packages.microsoft.gpg

Reference: VSCode Installation on Debian and Ubuntu based distributions

2
  • 1
    Thank you for answering and thank you it worked. i assume i accidentally repeated a step(i did follow that documentation when installing) so i got 2 package and i only sudo install once so the other package left out which cause this gpg error. maybemy assumption is incorrect, but i remember i accidentally repeated a certain step/re enter the same terminal command twice. in my other VMWare(Linux MInt) i followed it clearly without repeating a certain command and never had a problem(tho Mint OS) so this didnt happened. regardless, the error is now gone. Nice to meet you Don, and Thank You! Oct 2, 2022 at 11:54
  • You're welcome @DreacLeoson👌🏼
    – Don Alfons
    Oct 2, 2022 at 11:58

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .