Fix Missing GPG Key Apt Repository Errors (NO_PUBKEY) - Linux Uprising Blog

PHOTO EMBED

Mon Nov 13 2023 16:49:58 GMT+0000 (Coordinated Universal Time)

Saved by @anubisDev

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
content_copyCOPY

https://www.linuxuprising.com/2019/06/fix-missing-gpg-key-apt-repository.html