common
common copied to clipboard
Login with non-declaritive registry credential is overwriting `auth.json` of the previous credential when using `podman-docker`
Pasting this issue from the project https://github.com/containers/podman/issues/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
- Install podman-docker
- Follow docker.io's instructions to login
a. Create access token
b. run
docker login -u $USERc. 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