Import gpg key for rpm-ostree repositories

Hi, I’m adding the 1password repository for fedora on my silverblue (see here) but I had to disable the gpg check as I am unable to import the key.
when I run the rpm command to import it I get the following error.
error: can’t create transaction lock on /usr/share/rpm/.rpm.lock (Read-only file system)
error: key 1 import failed.

is there any way to layer these gpg keys?


1 Like

You can copy the key directly to the /etc/pki/rpm-gpg directory.

Hi @siosm , I tried to copy the asc key as suggested, but the error is the same

Updating metadata for '1password'... done
error: Updating rpm-md repo '1password': cannot update repo '1password': repomd.xml GPG signature verification error: Bad GPG signature

I have the seemingly identical issue with tailscale from

When I do rpm-ostree install tailscale or rpm-ostree compose tree they fail with:

error: importing RPMs: package tailscale-1.26.2-1.x86_64 cannot be verified and repo tailscale-stable is GPG enabled: /proc/self/fd/15/cache/repomd/tailscale-stable-rpmostree-unset-releasever-x86_64/packages/tailscale_1.26.2_x86_64.rpm could not be verified.
/proc/self/fd/15/cache/repomd/tailscale-stable-rpmostree-unset-releasever-x86_64/packages/tailscale_1.26.2_x86_64.rpm:  digest:  SIGNATURE:  NOT OK

I have imported and it is existing as /etc/pki/rpm-gpg/RPM-GPG-KEY-tailscale-stable

Nevermind, my case is unrelated: Tailscale has not signed the package, which I seen in the .repo with gpgcheck=0 as well as in the rpm itself which lead me to this Sign Fedora packages in addition to repo metadata · Issue #1882 · tailscale/tailscale · GitHub

that doesn’t happen to me, check you repo file. mine looks like this

name=Tailscale stable