0

When I run software updater and the repository tries to reload, always produces the error message below?

W:GPG error: http://ppa.launchpad.net/gezakovacs/ppa/ubuntu bionic InRelease: The following signatures couldn't be verified because the public key is not available: NO_PUBKEY D45DF2E8FC91AE7E, E:The repository 'http://ppa.launchpad.net/gezakovacs/ppa/ubuntu bionic InRelease' is not signed.
Kulfy
  • 17,696

1 Answers1

0

The error message says that the repository is not updated, and the previous index files will be used. That means you won't receive updates from that repository, so you should import the public GPG key to fix this issue.

This command updates the key for your specific repository:

sudo apt-key adv --keyserver hkp://pool.sks-keyservers.net:80 --recv-keys D45DF2E8FC91AE7E

If the error happens on more than one repository try this short script:

sudo apt update 2>&1 1>/dev/null | sed -ne 's/.*NO_PUBKEY //p' | while read key; do if ! [[ ${keys[*]} =~ "$key" ]]; then sudo apt-key adv --keyserver hkp://pool.sks-keyservers.net:80 --recv-keys "$key"; keys+=("$key"); fi; done

It searches for all missing keys and updates them.