El otro día me encontraba instalando Jenkins en un servidor Ubuntu 18.04 LTS cuando en medio del proceso me salió el siguiente mensaje de error: «the following signatures couldn’t be verified because the public key is not available».
Este es uno de esos tipos de errores que deben corregirse para poder culminar exitosamente una instalación.
El sistema de empaquetado de Ubuntu (comando «apt») tiene un conjunto de llaves (keys) que determinan si se puede «confiar» en un paquete para que pueda ser instalado.
A veces el sistema operativo no tiene todas las llaves que necesita para completar una instalación y por ello se genera este error. Algo parecido a esto:
ubuntu@myserver:~$ sudo apt-get-update
Hit:1 http://us-east-2.ec2.archive.ubuntu.com/ubuntu bionic InRelease
Hit:2 http://us-east-2.ec2.archive.ubuntu.com/ubuntu bionic-updates InRelease
Hit:3 http://us-east-2.ec2.archive.ubuntu.com/ubuntu bionic-backports InRelease
Ing:4 https://pkg.jenkins.io/debian binary/ InRelease
Get:5 https://pkg.jenkins.io/debian binary/ Release [2044 B]
Hit:6 http://security.ubuntu.com/ubuntu bionic-security InRelease
Get:7 https://pkg.jenkins.io/debian binary/ Release.gpg [833 B]
Ign:7 https://pkg.jenkins.io/debian binary/ Release.gpg
Reading package lists... Done
W: GPG error: https://pkg.jenkins.io/debian binary/ Release: The following signtures couldn't be verified because the public key is not available: NO_PUBKEY FCEF32E745F2C3D5
E: The repository 'https://pkg.jenkins.io/debian binary/ Release' 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.
ubuntu@myserver:~$
Nota que el mensaje claramente dice que no se encuentra el paquete FCEF32E745F2C3D5.
Por suerte hay una forma de solucionar este problema. Cada llave que falta debe agregarse al apt key manager y así autorizar la instalación de los paquetes.
Para eso sólo necesitas ejecutar el comando: sudo apt-key adv –keyserver keyserver.ubuntu.com –recv-keys CODIGO_LLAVE. Quedaría de la siguiente forma:
ubuntu@myserver:~$ sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-keys FCEF32E745F2C3D5
Executing: /tmp/apt-key-gpghome.oYr6ebgB4n/gpg.1.sh --keyserver keyserver.ubuntu.com --recv-keys FCEF32E745F2C3D5
gpg: key FCEF32E745F2C3D5: public key "Jenkins Project <jenkinsci-board@googlegroups.com>" imported
gpg: Total number processed: 1
gpt: imported: 1
ubuntu@myserver:~$
Luego de eso, se debe ejecutar «sudo apt-get update»:
ubuntu@myserver:~$ sudo apt-get-update
Hit:1 http://us-east-2.ec2.archive.ubuntu.com/ubuntu bionic InRelease
Get:2 http://us-east-2.ec2.archive.ubuntu.com/ubuntu bionic-updates InRelease [88.7 kB]
Get:3 http://us-east-2.ec2.archive.ubuntu.com/ubuntu bionic-backports InRelease [74.6 kB]
Hit:4 https://pkg.jenkins.io/debian binary/ InRelease
Ing:5 https://pkg.jenkins.io/debian binary/ Release
Get:6 https://pkg.jenkins.io/debian binary/ Release [2044 B]
Get:7 https://pkg.jenkins.io/debian binary/ Release.gpg [833 B]
Get:8 http://us-east-2.ec2.archive.ubuntu.com/ubuntu bionic-updates/main amd64 Packages [1089 kB]
Get:9 https://pkg.jenkins.io/debian binary/ Packages [31.0 kB]
Fetched 1286 kB in 1s (1876 kB/s)
Reading package lists... Done
ubuntu@myserver:~$
Con eso debería solucionarse el problema.
¿Te ayudó? déjame entonces un comentario.
Créditos de imagen de fondo: Vector de Coche creado por starline – www.freepik.es
¡Comenta! sobre "Cómo solucionar error «public key is not available» instalando Jenkins en Ubuntu"