Proxmox: public key is not available NO_PUBKEY
En Proxmox al intentar actualizar los repositorios con apt update me dio el siguiente error de NO_PUBKEY :
root@rancher:# apt update
Hit:1 http://ftp.debian.org/debian buster InRelease
Get:2 http://download.proxmox.com/debian/pve buster InRelease [3051 B]
Hit:3 http://security.debian.org/debian-security buster/updates InRelease
Hit:4 http://ftp.debian.org/debian buster-updates InRelease
Err:2 http://download.proxmox.com/debian/pve buster InRelease
The following signatures couldn't be verified because the public key is not available: NO_PUBKEY 7BF2812E8A6E88E0
Reading package lists... Done
W: GPG error: http://download.proxmox.com/debian/pve buster InRelease: The following signatures couldn't be verified because the public key is not available: NO_PUBKEY 7BF2812E8A6E88E0
E: The repository 'http://download.proxmox.com/debian/pve buster 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.
Esto sucede porque los repositorio de están firmados con GnuPG y Apt usa estas firmas para verificar que es un source seguro.
Para activarlo podemos hacerlo así.
Método 1:
wget http://download.proxmox.com/debian/proxmox-ve-release-6.x.gpg -O /etc/apt/trusted.gpg.d/proxmox-ve-release-6.x.gpg
ahora verificamos el checksum con sh512 o md5:
sha512sum /etc/apt/trusted.gpg.d/proxmox-ve-release-6.x.gpg
Output:
acca6f416917e8e11490a08a1e2842d500b3a5d9f322c6319db0927b2901c3eae23cfb5cd5df6facf2b57399d3cfa52ad7769ebdd75d9b204549ca147da52626 /etc/apt/trusted.gpg.d/proxmox-ve-release-6.x.gpg
md5sum /etc/apt/trusted.gpg.d/proxmox-ve-release-6.x.gpg
Output:
f3f6c5a3a67baf38ad178e5ff1ee270c /etc/apt/trusted.gpg.d/proxmox-ve-release-6.x.gpg
Método 2:
En caso que el método 1 no funcione puedes intentar esto.
apt-get install gnupg2 -y
wget http://download.proxmox.com/debian/key.asc
apt-key add key.asc
esto nos debería devolver un "OK" si todo a ido bien.
Posibles Problemas:
root@rancher:# apt-key add key.asc
E: gnupg, gnupg2 and gnupg1 do not seem to be installed, but one of them is required for this operation
Se soluciona instalando uno de los paquetes que mencionan.
apt-get install gnupg2 -y
Referencia: https://pve.proxmox.com/wiki/Package_Repositories