SUSE / rmt

RPM repository mirroring tool and registration proxy for SUSE Customer Center.
Other
38 stars 45 forks source link

Handle the empty credentials from the container runtime tools on the client #1208

Closed jesusbv closed 3 months ago

jesusbv commented 3 months ago

Description

When container runtime tools on the client do not send the proper credentials or an exception happens during the catalog search, handle the exception

How to test

Put wrong credentials on /etc/containers/config.json and run podman search foo and autentication required message is shown

ec2-user@ip-172-31-21-235:~> sudo /usr/bin/cloudguestregistryauth 
Credentials refreshed
ec2-user@ip-172-31-21-235:~> podman search foo
ERRO[0000] error getting search results from v2 endpoint "registry-ec2.susecloud.net": authentication required 
Error: 1 error occurred:
    * couldn't search registry "registry-ec2.susecloud.net": authentication required

ec2-user@ip-172-31-21-235:~> 

Change Type

Please select the correct option.

Checklist

Please check off each item if the requirement is met.

Review

Please check out our review guidelines and get in touch with the author to get a shared understanding of the change.