Automation Suite - podman encounters "error getting repository tags: unable to retrieve auth token: invalid username/password: authentication required"

How to fix podman error "getting repository tags: unable to retrieve auth token: invalid username/password: authentication required"

Issue Description

While running the podman search command in offline environment, getting the following error:

error getting repository tags: unable to retrieve auth token: invalid username/password: authentication required


podman error

Root Cause

The user is not logged into the registry or logged in with incorrect credentials

Resolution

Log in to the registry first in such cases. The credentials can be obtained using the following commands:

  1. To get the username, run the following command:
# kubectl -n uipath get secret docker-registry-credentials -o json | jq -r '.data.username' | base64 -d

  1. To get the password, run the following command:
# kubectl -n uipath get secret docker-registry-credentials -o json | jq -r '.data.password' | base64 -d

  1. To log in to registry, run the following command:
# podman login --tls-verify=false localhost:30071
username:
password:

Supply the credentials obtained in step 1 & step 2.

  1. Run the podman search command to obtain the required output.