Ubuntu – Error while trying to sudo apt-get update GPG, no sign repository


I didn't quite understand how to fix these stuff from other posts. Can someone help me?

W: GPG error: https://dl.winehq.org/wine-builds/ubuntu bionic InRelease: The following signatures couldn't be verified because the public key is not available: NO_PUBKEY 818A435C5FCBF54A
E: The repository 'https://dl.winehq.org/wine-builds/ubuntu bionic 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.

Best Answer

When you are getting a public key error, the key itself is the last 8 digits of the NO_PUBKEY.

To install it run the following line

sudo apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv 5FCBF54A

Then rerun your

sudo apt update

Hope this helps!

Related Question