Note: This bug is displayed in read-only format because
the product is no longer active in Red Hat Bugzilla.
RHEL Engineering is moving the tracking of its product development work on RHEL 6 through RHEL 9 to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "RHEL project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs in the statuses "NEW", "ASSIGNED", and "POST" are being migrated throughout September 2023. Bugs of Red Hat partners with an assigned Engineering Partner Manager (EPM) are migrated in late September as per pre-agreed dates. Bugs against components "kernel", "kernel-rt", and "kpatch" are only migrated if still in "NEW" or "ASSIGNED". If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "RHEL project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/RHEL-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.
DescriptionKen Dreyer (Red Hat)
2020-02-07 22:54:21 UTC
Description of problem:
"podman login" writes its credentials in such a way that "skopeo copy" cannot use them.
Version-Release number of selected component (if applicable):
podman-1.6.4-3.module+el8.2.0+5399+beb15b66.x86_64
skopeo-0.1.40-8.module+el8.2.0+5352+afaeb1b9.x86_64
How reproducible:
always
Steps to Reproduce:
1. Obtain an account token that has write access to a registry.
2. Log in like so:
sudo podman login -p **** -u unused docker-registry.example.com
3. Verify the output says "Login succeeded!"
4. Run "skopeo copy" like so:
sudo skopeo copy docker://origin.com/mycontainer:latest docker://docker-registry.example.com/mycontainer:latest
Actual results:
Error uploading manifest latest to docker-registry.example.com/mycontainer: unauthorized: authentication required
Expected results:
The copy operation proceeds without error.
Additional info:
This exact same set of commands works fine in Fedora 30 with podman-1.7.0-3.fc30 and skopeo-0.1.40-2.fc30. I have tested this in completely new RHEL 8.1 and Fedora 30 VMs.
In RHEL 8:
"podman login" stores its credentials in this file: /run/user/0/containers/auth.json
But "skopeo copy" is trying to read this file:
/run/containers/0/auth.json
On Fedora 30, podman and skopeo both use this file:
/run/containers/0/auth.json
When I move the file on my RHEL 8 system to the correct location, then skopeo is able to successfully copy images:
mkdir -p /run/containers/0/
mv /run/user/0/containers/auth.json /run/containers/0/
skopeo copy ...
Comment 1Ken Dreyer (Red Hat)
2020-02-07 22:59:42 UTC
When I downgrade to podman-1.4.2-6.module+el8.1.0+4830+f49150d7.x86_64 , "podman login" correctly writes to /run/containers/0/auth.json .
Comment 2Ken Dreyer (Red Hat)
2020-02-07 23:18:05 UTC
Reading the source of libpod-5cc9284.tar.gz, I see now that podman will use XDG_RUNTIME_DIR if that is set. That env variable is indeed defined on RHEL 8 VM. I think this means podman respects XDG_RUNTIME_DIR and skopeo does not.
Comment 3Ken Dreyer (Red Hat)
2020-02-07 23:33:41 UTC
Even when I unset the XDG_RUNTIME_DIR environment variable, I am still unable to get podman to write its auth file to anywhere other than /run/user/0/containers/auth.json
I think this is more of a skopeo bug then a Podman bug, although we should consolidate all of the code to find the auth files into one library and share it between all of the tools.
This is fixed in Skopeo v1.0 which will included in RHEL 8.3. There is now a `skopeo login` and `skopeo logout` command that handles the authorization needs of Skopeo.
Setting to Post and assigning to Jindrich so he can handle any BZ or packaging needs.
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.
For information on the advisory (Moderate: container-tools:rhel8 security, bug fix, and enhancement update), and where to find the updated
files, follow the link below.
If the solution does not work for you, open a new bug report.
https://access.redhat.com/errata/RHSA-2020:4694