Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Login with non-declaritive registry credential is overwriting auth.json of the previous credential when using podman-docker #2314

Open
lslavkov opened this issue Feb 3, 2025 · 2 comments

Comments

@lslavkov
Copy link

lslavkov commented Feb 3, 2025

Pasting this issue from the project containers/podman#22400.

Initially when you have already login from registry.fedoraproject.org using podman login then using docker login to the default registry.

Steps to reproduce

  1. Install podman-docker
  2. Follow docker.io's instructions to login
    a. Create access token
    b. run docker login -u $USER
    c. enter token

Describe the results you received

$ podman login -u $USER
Password:
Login Succeeded!
$ cat /run/user/1000/containers/auth.json
{
    "auths": {
	    "registry.fedoraproject.org": {
		    "auth": "cGF0cmljazpkY2tyX3BhdF84X2xvbHRoaXNhaW50cmVhbAo="
       }
    }
}
$ docker push $USER/$IMAGE
[...]
Error: writing blob: initiating layer upload to /v2/$USER/$IMAGE/blobs/uploads/ in registry-1.docker.io: requested access to the resource is denied

Describe the results you expected

$ docker login -u $USER
Password: 
Login Succeeded!
$ cat /run/user/1000/containers/auth.json
{
    "auths": {
	    "registry-1.docker.io": {
		    "auth": "cGF0cmljazpkY2tyX3BhdF84X2xvbHRoaXNhaW50cmVhbAo="
	    }
    }
}⏎
$ docker push $USER/$IMAGE
Writing manifest to image destination

^ exit success

or

Failure for the login command
@mtrmac
Copy link
Contributor

mtrmac commented Feb 4, 2025

(A drive-by comment:) Note that there is much more discussion in the Podman issue. It’s not at all clear that the consensus is the “expected behavior” above.

@lslavkov
Copy link
Author

lslavkov commented Feb 6, 2025

Good point on that but I think is a good idea to keep aware that there is such thread talking about this issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants