Adding Linux REPO to RedHat Satellite

We are trying to add the Hashicorp Linux REPO to our RedHat Satellite server, and having it auto sync daily (will possibly upgrade to enterprise in the future). However when adding it to the Satellite, no files can be downloaded/found. We can do this manually via “dnf reposync”, however thats a manual process which we want to try to avoid, even with CRON.

The URLs we tried are:

https://rpm.releases.hashicorp.com
https://rpm.releases.hashicorp.com/RHEL/
https://rpm.releases.hashicorp.com/RHEL/8/
https://rpm.releases.hashicorp.com/RHEL/8/x86_64/
https://rpm.releases.hashicorp.com/RHEL/8/x86_64/stable/

All tried with and without the slash at the end. We also tried using Yum Repo Discovery to no availability.

Hi @SmoothJ,

I want to first caveat that I’m not actually familiar with any modern Linux distributions that use RPMs, so I’m responding here only based on what I know from the documentation and not from any practical experience. You may well see why what I’m about to suggest is obviously wrong, but I’m suggesting only in the hope it might be a helpful clue.

When I look at the documentation about the RPM package repositories I see it state a URL format like this:

https://rpm.releases.hashicorp.com/$release/hashicorp.repo

I believe $release here is a placeholder for what you listed as RHEL in your examples, so by my interpretation of the docs the expected repository URL would be the following:

https://rpm.releases.hashicorp.com/RHEL/hashicorp.repo

Does including that extra filename on the end of the URL help? Or is there something special about this “reposync” feature that means it requires a different sort of configuration than it would to directly add the repository?

(If anyone who sees this knows dnf better than I do – that is, knows it at all :upside_down_face: – please do chime in and give a more learned answer! :grinning: )

@apparentlymart you are partially correct. I think the issue that @SmoothJ is having is the same one I am running into.

https://rpm.releases.hashicorp.com/$release/hashicorp.repo is a repository file that contains all the information that yum/dnf needs to pull updates from. The information in that file is what is needed for satellite server to pull from the Hashicorp repo. Inside that repofile is the line baseurl=https://rpm.releases.hashicorp.com/RHEL/$releasever/$basearch/stable which in most cases you could go to that URL and replace the $releasever and $basearch with the appropriate values and see what’s in the repo. Unfortunately doing so gives the following error:

<Error>
<Code>NoSuchKey</Code>
<Message>The specified key does not exist.</Message>
<Key>RHEL/8/x86_64/stable/</Key>
<RequestId>CXD0774P78X9PPDM</RequestId>
<HostId>09zSqbdG1l8zSpbuQxAOU6aybe7+scwvav3mqY04yqGYYEvjw21H9gmE4F179aNQFXWFyiZabdg=</HostId>
</Error>

@SmoothJ I don’t know if you ever got this working. If you did, what was your fix? I don’t know if you have the GPG key configured or not in satellite server but that would be my next thing to try. I also know that if you extend the URL with https://rpm.releases.hashicorp.com/RHEL/8/x86_64/stable/repodata/repomd.xml it will pull down the file so I know the structure is correct. Just need to figure out what that stupid key is referring to.

https://rpm.releases.hashicorp.com/RHEL/8/x86_64/stable is just right for the Upstream URL.
gpg key should be downloaded from https://rpm.releases.hashicorp.com/gpg and added to the repo. Then synchronize and it should go through.