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
  • 114,770

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

  • Thanks, I tried this but getting no change.karthik@karthik-Z590-UD-AC:~$ sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-keys EB3E94ADBE1229CF Executing: /tmp/apt-key-gpghome.nNq5RnPtvY/gpg.1.sh --keyserver keyserver.ubuntu.com --recv-keys EB3E94ADBE1229CF gpg: key EB3E94ADBE1229CF: "Microsoft (Release signing) gpgsecurity@microsoft.com" not changed gpg: Total number processed: 1 gpg: unchanged: 1 – karthik Vijeyaraghavan Sep 30 '22 at 08:18
  • @karthikVijeyaraghavan Yes, sometimes it won't work. I just added another solution. – Don Alfons Oct 02 '22 at 11:54