Problema Apt Public Key Not Available

Siempre surgen problemillas.
y mas cuando ya tienes mas de 24 servidoes al mando. Esta vez al actualizar un Debian9 corriendo un Nextclud me encuentro esto:

W: An error occurred during the signature verification. The repository is not updated and the previous index files will be used. GPG error: http://apt.jurisic.org/debian stretch

root@em50l:/~#  apt-get update
Get:1 http://apt.jurisic.org/debian stretch InRelease [7449 B]       
Err:1 http://apt.jurisic.org/debian stretch InRelease                                                
  The following signatures couldn't be verified because the public key is not available: NO_PUBKEY 99EADCDA7E885BB2
Ign:2 http://ftp.us.debian.org/debian stretch InRelease                                        
Hit:3 http://ftp.us.debian.org/debian stretch Release
Fetched 7449 B in 0s (11.9 kB/s)
Reading package lists... Done
W: An error occurred during the signature verification. The repository is not updated and the previous index files will be used. GPG error: http://apt.jurisic.org/debian stretch InRelease: The following signatures couldn't be verified because the public key is not available: NO_PUBKEY 99EADCDA7E885BB2
W: Failed to fetch http://apt.jurisic.org/debian/dists/stretch/InRelease  The following signatures couldn't be verified because the public key is not available: NO_PUBKEY 99EADCDA7E885BB2
W: Some index files failed to download. They have been ignored, or old ones used instead.


Pues al lio….

apt-get install dirmngr

root@em50l:/~#  apt-get install dirmngr
Reading package lists... Done
Building dependency tree       
Reading state information... Done
Suggested packages:
  dbus-user-session pinentry-gnome3 tor
The following NEW packages will be installed:
  dirmngr
0 upgraded, 1 newly installed, 0 to remove and 0 not upgraded.
Need to get 597 kB of archives.
After this operation, 1114 kB of additional disk space will be used.
Get:1 http://ftp.us.debian.org/debian stretch/main amd64 dirmngr amd64 2.1.18-8~deb9u4 [597 kB]
Fetched 597 kB in 1s (498 kB/s)  
Preparing to unpack .../dirmngr_2.1.18-8~deb9u4_amd64.deb ...
Unpacking dirmngr (2.1.18-8~deb9u4) ...
Setting up dirmngr (2.1.18-8~deb9u4) ...



apt-key adv --keyserver hkp://pool.sks-keyservers.net:80 --recv-keys 99EADCDA7E885BB2
Donde 99EADCDA7E885BB2 es la key que me daba problemas.

root@em50l:/~#  apt-key adv --keyserver hkp://pool.sks-keyservers.net:80 --recv-keys 99EADCDA7E885BB2
Executing: /tmp/apt-key-gpghome.k3kvsRbNbo/gpg.1.sh --keyserver hkp://pool.sks-keyservers.net:80 --recv-keys 99EADCDA7E885BB2
gpg: key 99EADCDA7E885BB2: public key "Ivan Juri\xc5\xa1i\xc4\x87 <ivan@jurisic.org>" imported
gpg: Total number processed: 1
gpg:               imported: 1

Y ya puedo actualizar sin problemas.

root@em50l:/~#  apt-get update && apt-get upgrade
Hit:1 http://apt.jurisic.org/debian stretch InRelease
Ign:2 http://ftp.us.debian.org/debian stretch InRelease         
Hit:3 http://ftp.us.debian.org/debian stretch Release
Reading package lists... Done
Reading package lists... Done
Building dependency tree       
Reading state information... Done
Calculating upgrade... Done
The following packages have been kept back:
  nextcloud-server
0 upgraded, 0 newly installed, 0 to remove and 1 not upgraded.



Otros comandos utiles.

  • apt-get install debian-keyring
  • apt-get install debian-archive-keyring
  • apt-key list

Otroa articulos parecidos y/o de referencia