-
Notifications
You must be signed in to change notification settings - Fork 8
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
Docker Desktop Credential Sync Issue with docker login on Linux #269
Comments
Hi @Perpetue237 , |
Hello, |
The Docker CLI can't do barely anything by itself. It is mostly interacting with the Docker Daemon.
Both versions use Have you tried to install docker-ce and docker-desktop? |
Hello,
The problem I am facing is that when Docker is using the desktop-linux context (which happens when I start Docker Desktop), I cannot authenticate to my private registry hosted on another server. I authenticate to Docker Hub as username1 with password1. However, on my private registry, I use username2 with password2. When I start Docker CE with After authenticating, I am able to push and pull images from it without any issues. However, when I start Docker Desktop and log in to my private registry using the same credentials, I cannot perform any operations, even though I receive a "login successful" message. As mentioned in the first post, it seems like the Docker CLI under Docker Desktop is not handling different user credentials properly. Is there another way to log in to a private registry when Docker is using the desktop-linux context? Or could this be a bug with how Docker Desktop handles authentication for multiple registries? |
Description
I’m encountering a frustrating issue with Docker Desktop and the CLI on my Linux machine when trying to push images to my private registry.
I’m using Docker Desktop and Docker CLI on Linux to interact with my private registry (private host).
The
docker login
command works perfectly fine, and I can authenticate successfully using my credentials. However, when I try to push an image to the registry, Docker uses the wrong credentials, resulting in a 403 Forbidden error during the push.Observations:
~/.docker/config.json
or credential management system.What I Tried:
~/.docker/config.json
to ensure it’s fresh, but it doesn’t seem to affect the credentials used by Docker Desktop.How can I ensure Docker Desktop and the CLI use the same credentials for my private registry? If Docker Desktop uses a separate credential store, how can I force it to use the credentials for my private registry?
Any advice would be greatly appreciated!
Best,
Reproduce
docker context use desktop-linux
docker login URL -u username -p password
docker tag imageID URL/image:tag
docker push URL/image:tag
`
Expected behavior
pushed
docker version
docker version Client: Docker Engine - Community Version: 27.4.1 API version: 1.47 Go version: go1.22.10 Git commit: b9d17ea Built: Tue Dec 17 15:45:42 2024 OS/Arch: linux/amd64 Context: desktop-linux Server: Docker Desktop 4.37.1 (178610) Engine: Version: 27.4.0 API version: 1.47 (minimum version 1.24) Go version: go1.22.10 Git commit: 92a8393 Built: Sat Dec 7 10:38:57 2024 OS/Arch: linux/amd64 Experimental: false containerd: Version: 1.7.21 GitCommit: 472731909fa34bd7bc9c087e4c27943f9835f111 runc: Version: 1.1.13 GitCommit: v1.1.13-0-g58aa920 docker-init: Version: 0.19.0 GitCommit: de40ad0
docker info
Diagnostics ID
E5466145-6613-49D5-BEB3-25CFB4B69B82/20250110150102
Additional Info
Ubuntu 24.04
The text was updated successfully, but these errors were encountered: