Cloudflared-stable repo GPG key format

Hello,

I recently followed the instructions on the “Cloudflared packages” page to install the cloudflared-stable repo on a RHEL 6 host. When I ran yum install cloudflared, I got the following error.

Is this ok [y/N]: y
Downloading Packages:
cloudflared-linux-x86_64.rpm                             |  15 MB     00:01
warning: rpmts_HdrFromFdno: Header V4 RSA/SHA512 Signature, key ID 8caccbf8: NOKEY
Retrieving key from https://pkg.cloudflare.com/cloudflare-main.gpg


Invalid GPG Key from https://pkg.cloudflare.com/cloudflare-main.gpg: No key found in given key data

The GPG key supplied at that URL does not appear to be in the correct format. According to man yum.conf, the gpgkey option specifies

A URL pointing to the ASCII-armored GPG key file for the repository.

However, Cloudflare-main.gpg is a binary file.

[[email protected] ~]# file cloudflare-main.gpg
cloudflare-main.gpg: GPG key public ring
[[email protected] ~]#

rpm also points this out:

[[email protected] ~]# rpm --import https://pkg.cloudflare.com/cloudflare-main.gpg
error: https://pkg.cloudflare.com/cloudflare-main.gpg: key 1 not an armored public key.
[[email protected] ~]#

In order to get the key to work on my system, I downloaded the key using curl and converted it to an ASCII-armored public key.

curl -fsSL https://pkg.cloudflare.com/cloudflare-main.gpg | gpg --enarmor > RPM-GPG-KEY-cloudflared-stable

I then dropped that file into /etc/pki/rpm-gpg/ after editing the opening and closing lines of the public key.

[[email protected] ~]# head -n1 /etc/pki/rpm-gpg/RPM-GPG-KEY-cloudflared-stable
-----BEGIN PGP PUBLIC KEY BLOCK-----
[[email protected] ~]# tail -n1 /etc/pki/rpm-gpg/RPM-GPG-KEY-cloudflared-stable
-----END PGP PUBLIC KEY BLOCK-----
[[email protected] ~]#

Am I misunderstanding how this GPG key is meant to be used, or are there plans to change the key format in the future to make it compatible with the gpgkey directive?

Thanks!

I’d recommend posting your issue on the below GitHub issue, which is likely to be seen/resolved quicker by the cloudflared team:

Recently I remember one topic, the below might be a bit of help, maybe? :thinking:

Cloudflare recently switched the location of the repo for cloudflared and the instructions are available https://pkg.cloudflare.com/

The instructions for installing on generic RHEL system are

# Add cloudflared.repo to /etc/yum.repos.d/ 
curl -fsSl https://pkg.cloudflare.com/cloudflared.repo | sudo tee /etc/yum.repos.d/cloudflared.repo

#update repo
sudo yum update

# install cloudflared
sudo yum install cloudflared

This topic was automatically closed 15 days after the last reply. New replies are no longer allowed.