3

The google-cloud-sdk repo file for Red Hat Enterprise Linux 7 and CentOS 7 contains two gpgkey URLs. This is what the repo file looks like:

[google-cloud-sdk]
name=Google Cloud SDK
baseurl=https://packages.cloud.google.com/yum/repos/cloud-sdk-el7-x86_64
enabled=1
gpgcheck=1
repo_gpgcheck=1
gpgkey=https://packages.cloud.google.com/yum/doc/yum-key.gpg
       https://packages.cloud.google.com/yum/doc/rpm-package-key.gpg

Source: https://cloud.google.com/sdk/downloads

The package managers DNF and YUM are able to use this repo. Other default applications which use repo files such as PackageKit-command-not-found and gnome-software receive the following 404 error:

Failed to search for file: Status code: 404 for https://packages.cloud.google.com/yum/doc/yum-key.gpg;https:/packages.cloud.google.com/yum/doc/rpm-package-key.gpg
2
  • 1
    Sounds like a bug in PackageKit and gnome-software. You should report it to the developers. What is the question here?
    – Jakuje
    Oct 20, 2016 at 8:37
  • My question is if this is a bug or incorrectly formatted repo file.
    – user381652
    Nov 4, 2016 at 15:23

1 Answer 1

4

Manual page for dnf.conf says:

gpgkey list of strings

and list is defined as

list It is an option that could represent one or more strings separated by space or comma characters.

Therefore from the DNF/Yum point of view, the syntax is not correct (but accepted). You can try to modify the file to have the values separated by space or comma, which might help:

gpgkey=https://packages.cloud.google.com/yum/doc/yum-key.gpg,https://packages.cloud.google.com/yum/doc/rpm-package-key.gpg

If it does, it is a bug in Google Cloud offering this invalid repo.

3
  • Seperating the gpgkey URLs by a comma, space or newline does not resolve the issue. If I place only a comma or newline between the two URLs I get status code 404, only a space gives status code 400.
    – user381652
    Dec 6, 2016 at 21:03
  • Then it is a bug in PackageKit.
    – Jakuje
    Dec 7, 2016 at 10:12
  • This worked for me on Fedora Silverblue
    – jgillich
    Mar 9, 2019 at 14:06

You must log in to answer this question.