I recently added some extra repositories with the Mysterium network and received this error when I reloaded the apt package database:
GPG error: http://ppa.launchpad.net/mysteriumnetwork/node/ubuntu focal InRelease: The following signatures couldn't be verified because the public key is not available: NO_PUBKEY ECCB6A56B22C536D
To fix this, I found to execute the following commands in the terminal:
sudo apt-key adv –keyserver keyserver.ubuntu.com –recv-keys <PUBKEY>
Or to put in in one line for this example where <PUBKEY> is your missing public key for the repository, e.g. ECCB6A56B22C536D. I assume this would work with other instances of this error, but have yet to try this as I have not encountered it outside of the Mysterium install.
sudo apt-key adv –keyserver keyserver.ubuntu.com –recv-keys ECCB6A56B22C536D
Then Update the apt cache:
sudo apt-get update
ALTERNATE METHOD:
sudo gpg --keyserver pgpkeys.mit.edu --recv-key ECCB6A56B22C536D
sudo gpg -a --export ECCB6A56B22C536D | sudo apt-key add -
sudo apt-get update
Note that when you import a key like this using apt-key
you are telling the system that you trust the key you’re importing to sign the software your system will be using. Do not do this unless you’re sure the key is really the key of the package distributor.
And like the other method above, run:
apt-get update
While not the more challenging tasks, it is annoying, to say the least.