Fix “no signature key” in Ubuntu/Debian
Trying to update an Ubuntu 16.04 but was failing constantly because no signature key was there as you can see from the following warning:
- The following signatures couldn't be verified because the public key is not available: NO_PUBKEY 40976EAF437D05B5 NO_PUBKEY 3B4FE6ACC0B21F32 - The following signatures couldn't be verified because the public key is not available: NO_PUBKEY 40976EAF437D05B5 NO_PUBKEY 3B4FE6ACC0B21F32
Looking at the error above, apt is telling us that the following keys are missing: 40976EAF437D05B5 and 3B4FE6ACC0B21F32.
Notice that these are listed multiple times. Each unique key will only need to be added once.
Assuming we know the app and the server is considered secure then the fastest way of fixing this is by adding the missing keys.
To add these keys, grab the keys from the warning message and run the following commands:
sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-keys 40976EAF437D05B5 sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-keys 3B4FE6ACC0B21F32
After that you can safely update your Ubuntu/Debian.