You get this error when you apt-get update
The following signatures couldn’t be verified because the public key is not available: NO_PUBKEY 1A1C1C101311121
How to import missing gpg key from all the repository in a oneliner.
Thanx to
https://www.linuxuprising.com/2019/06/fix-missing-gpg-key-apt-repository.html
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
Leave a Reply