0

I got this gpg error while upgrading to Ubuntu 20.04:

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
karel
  • 122,292
  • 133
  • 301
  • 332

1 Answers1

1

You can add the key to the system using this command:

sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-keys EB3E94ADBE1229CF

If not working yet, you can checkout How do I fix the GPG error "NO_PUBKEY"?

OR

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

Reference: VSCode Installation on Debian and Ubuntu based distributions