RPM import key error: key 1 not an armored public key

Written by - 0 comments

Published on - Listed in Linux Git


During a GitLab CI/CD pipeline run, one of the jobs failed with an error:

The error occurred while manually trying to import the GPG key for the EPEL repositories, in this case for the EL7 packages:

$ rpm --import ./rhel7/RPM-GPG-KEY-EPEL-7
error: ./rhel7/RPM-GPG-KEY-EPEL-7: key 1 not an armored public key.
Cleaning up project directory and file based variables 00:01
ERROR: Job failed: exit code 1

Although this error (not an armored public key) doesn't really hint what the actual problem could be, I noticed that there seemed to be a copy+paste error in the repository's RPM-GPG-KEY-EPEL7 file: A missing new line between the "Version" line and the beginning of the GPG key.

In the next commit, this was fixed in the repository and a newline added:

Added missing newline in GPG key

At the next pipeline run, the import of the GPG key worked successfully.

Interestingly using cat inside the pipeline job seems to remove newlines, which was the origin of the copy+paste error:

Missing newlines when using cat command inside Gitlab pipeline job


Add a comment

Show form to leave a comment

Comments (newest first)

No comments yet.

RSS feed

Blog Tags:

  AWS   Android   Ansible   Apache   Apple   Atlassian   BSD   Backup   Bash   Bluecoat   CMS   Chef   Cloud   Coding   Consul   Containers   CouchDB   DB   DNS   Database   Databases   Docker   ELK   Elasticsearch   Filebeat   FreeBSD   Galera   Git   GlusterFS   Grafana   Graphics   HAProxy   HTML   Hacks   Hardware   Icinga   Influx   Internet   Java   KVM   Kibana   Kodi   Kubernetes   LVM   LXC   Linux   Logstash   Mac   Macintosh   Mail   MariaDB   Minio   MongoDB   Monitoring   Multimedia   MySQL   NFS   Nagios   Network   Nginx   OSSEC   OTRS   Office   PGSQL   PHP   Perl   Personal   PostgreSQL   Postgres   PowerDNS   Proxmox   Proxy   Python   Rancher   Rant   Redis   Roundcube   SSL   Samba   Seafile   Security   Shell   SmartOS   Solaris   Surveillance   Systemd   TLS   Tomcat   Ubuntu   Unix   VMWare   VMware   Varnish   Virtualization   Windows   Wireless   Wordpress   Wyse   ZFS   Zoneminder