Description
In Docker 27.1.2, running docker login multiple times causes the authentication information in ~/.docker/config.json to be updated with the latest successful execution.
In 27.2.0, the first successful authentication prevents config.json from being updated.
This is a breaking change because the existing expectation is that docker login always overwrites the authentication information.
Reproduce
- docker login repository-a
- docker login repository-b
- docker push repository-b/image
The push will fail since the authentication information recorded is for repository-a.
I've reproduced this in https://gitlab.com/gitlab-org/gitlab/-/issues/481917#note_2081566814 by removing config.json before performing the second authentication.
Expected behavior
docker login always updates config.json with the successful authentication credentials.
docker version
docker info
Additional Info
https://gitlab.com/gitlab-org/gitlab/-/issues/481917
Description
In Docker 27.1.2, running
docker loginmultiple times causes the authentication information in~/.docker/config.jsonto be updated with the latest successful execution.In 27.2.0, the first successful authentication prevents
config.jsonfrom being updated.This is a breaking change because the existing expectation is that
docker loginalways overwrites the authentication information.Reproduce
The push will fail since the authentication information recorded is for
repository-a.I've reproduced this in https://gitlab.com/gitlab-org/gitlab/-/issues/481917#note_2081566814 by removing
config.jsonbefore performing the second authentication.Expected behavior
docker loginalways updatesconfig.jsonwith the successful authentication credentials.docker version
docker info
Additional Info
https://gitlab.com/gitlab-org/gitlab/-/issues/481917