Curl Error (77)

Latest response

Hi guys I've had issues with dnf install createrepo as it shows the below error.

[root@localhost admin]# dnf install createrepo
Updating Subscription Management repositories.
created by dnf config-manager from https://repo.tes 0.0 B/s | 0 B 00:01
Errors during downloading metadata for repository 'repo.test.com':
- Curl error (77): Problem with the SSL CA cert (path? access rights?) for https://repo.test.com/repodata/repomd.xml [error setting certificate verify locations:
CAfile: /etc/pki/tls/certs/ca-bundle.crt
CApath: none]
Error: Failed to download metadata for repo 'repo.test.com': Cannot download repomd.xml: Curl error (77): Problem with the SSL CA cert (path? access rights?) for https://repo.test.com/repodata/repomd.xml [error setting certificate verify locations:
CAfile: /etc/pki/tls/certs/ca-bundle.crt
CApath: none]

I've tried
sudo dnf clean all
sudo rm -r /var/cache/dnf
sudo dnf upgrade

However all still came to the same error output, can someone please assist with this one.

Currently running RHEL 8

Responses

Hello Wei Ting Tuan,

EDITED highly consider not using a custom repository to install “nano” rpm, please consider using the Red Hat repo. Please make sure your system is properly subscribed and has Red Hat repositories available

It sounds possible you have a file located in /etc/yum.repos.d/ that has an incorrect URL.

  • Recommend temporarily moving any files out of /etc/yum.repos.d/*.repo to a safe location and re-registering your system with Red Hat, then try your yum commands (as root) again.
  • After reregistering your system, do a yum clean all and yum repolist, see the bit below I borrowed from Christian Labisch in a block of text later in my post here.
  • When registering your system with Red Hat, here's some steps as my colleague Christian Labisch would recommend:
sudo subscription-manager remove --all
sudo subscription-manager unregister
sudo subscription-manager clean
sudo subscription-manager register
sudo subscription-manager refresh
sudo subscription-manager list --available
sudo subscription-manager attach --pool=<Pool-ID>

If you must use your custom repository in /etc/yum.repos.d/

  • If you really need to use the custom repository in /etc/yum.repos.d/ - To start with, in the repo file you created, change "https" to just "http". Validate your URL for accuracy (next step)
  • The repo error you mention in your original post says "https://repo.test.com/repodata/repomd.xml" which may not be a valid host.
  • To start with, open a web browser such as chrome or Firefox and attempt to navigate to the repository you're trying to use.
  • Compare the URL in the browser to the file you are using in /etc/yum.repos.d/
  • Make changes as necessary so your file points to a valid URL.

Post back here please with the results, or if you need assistance, someone should chime in. If needed, submit a case with Red Hat directly https://access.redhat.com/support/cases/

Regards,
RJ

My previous post was edited for clarity (hopefully), please refresh the page.

Regards,
RJ

Hi RJ,

Thank you for your input here, I'm trying to download the nano.x86_64 repository.

I've tried this step: sudo subscription-manager remove --all sudo subscription-manager unregister sudo subscription-manager clean sudo subscription-manager register sudo subscription-manager refresh sudo subscription-manager list --available sudo subscription-manager attach --pool=

So as moving all my/.repo file in /etc/yum.repos.d/.repo from "https" to "http", however i still get the same SSL CA error where the URL points to "Errors during downloading metadata for repository 'repo.test.com':"

my repo.test.com.repo file shows the below, seems the URL is wrong.

[root@localhost admin]# cat /etc/yum.repos.d/repo.test.com.repo [repo.test.com] name=created by dnf config-manager from http://repo.test.com baseurl=http://repo.test.com enabled=1 [root@localhost admin]#

In this case if I want to install the rpm for "Package - nano-2.9.8-1.el8.x86_64.rpm". Do i just need to find the right repo for it and update the baseurl in repo.test.com.repo?

Kind regards,

Tim

Wei Ting Tuan,

I recommend you fix the URL before proceeding. That being said, I think the RPM named "nano" is available from Red Hat. Please consider first temporarily moving that file out of the way until you actually get your Red Hat subscription and repositories fully working. See this discussion https://access.redhat.com/discussions/4117121. Then try (as root) to attempt to do a yum install nano after you have your official Red Hat repositories installed

If needed, open a case with Red Hat to get your system properly subscribed and to get your Red Hat repositories connected. It is generally better to use the Red Hat repositories where possible than the upstream open source project where possible.

Is there a important need for you to not use Red Hat's version of nano? If this is the case, then get the correct URL and fix your repo file.

Kind Regards,
RJ

Hey Tim,

First, before you ever execute this, make sure you understand what's going on in this one-liner. Obligatory warning: I did this from memory, it may need correction.

grep 'repo.test.com' /etc/yum.repos.d/* | tr ':' ' '| awk '{print $1}' | xargs -I '{}' sudo mv {} /tmp/

This should move the offending repo to /tmp, after which you should be able to run

dnf install createrepo

Wei Ting Tuan,

If you are just needing the nano rpm, then the "nano" rpm, then know that is part of your Red Hat subscription and available in the official Red Hat repositories.

  • Please make sure your system is registered with Red Hat and that your official Red Hat subscriptions are available.
  • See Stephen Sadowski's post above for a command to move the repo out of the way.
  • See Christian Labisch's response at this discussion https://access.redhat.com/discussions/4117121 where he mentions the process for registration and attaching Red Hat repositories You can open a case with Red Hat on attaching your subscription and repositories too:

[From Christian Labisch] Un-register the system :

sudo subscription-manager remove --all
sudo subscription-manager unregister
sudo subscription-manager clean

Re-register the system :

sudo subscription-manager register
sudo subscription-manager refresh

Search for the Pool ID : (make note of the Pool ID for the next step)

sudo subscription-manager list --available

Attach to subscription :

sudo subscription-manager attach --pool=<Pool-ID>

Cleanup dnf and cache :

sudo dnf clean all
sudo rm -r /var/cache/dnf

You can search for the nano repo (make sure to temporarily move your repo with the wrong URL out of the way first)

sudo yum search nano

If you can see your repositories, you can install nano

sudo yum install nano

If you wish, update the resources (or install updates on your system) :

sudo dnf upgrade

Please let us know how this goes,

Regards,
RJ