Issue
I have issue with debian 9.13 apt-key when i try to update the apt package it show this error message:
# sudo apt update
Err:2 http://security.debian.org/debian-security stretch/updates InRelease
The following signatures couldn't be verified because the public key is not available: NO_PUBKEY AA8E81B4331F7F50 NO_PUBKEY 112695A0E562B32A
Ign:3 http://ftp.us.debian.org/debian stretch InRelease
Hit:4 http://ftp.us.debian.org/debian stretch-updates InRelease
Hit:5 http://ftp.us.debian.org/debian stretch Release
Reading package lists... Done
Building dependency tree
Reading state information... Done
All packages are up to date.
W: An error occurred during the signature verification. The repository is not updated and the previous index files will be used. GPG error: http://security.debian.org/debian-security stretch/updates InRelease: The following signatures couldn't be verified because the public key is not available: NO_PUBKEY AA8E81B4331F7F50 NO_PUBKEY 112695A0E562B32A
W: Failed to fetch http://security.debian.org/debian-security/dists/stretch/updates/InRelease The following signatures couldn't be verified because the public key is not available: NO_PUBKEY AA8E81B4331F7F50 NO_PUBKEY 112695A0E562B32A
W: Some index files failed to download. They have been ignored, or old ones used instead.
How to fix it?
Solution
with ubuntu you can add your loosed key as following:
sudo apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv
I think it's the same for debian.
Answered By - sumer5020 Answer Checked By - Marilyn (WPSolving Volunteer)