Error storing credentials - err: exec: "docker-credential-desktop": executable file not found in $PATH

docker compose version
Docker Compose version v2.36.2

Hello people:
I should intall postgres, if I’m not mistaken first of all I have to do login on docker.

docker login

USING WEB-BASED LOGIN

i Info → To sign in with credentials on the command line, use ‘docker login -u ’

Your one-time device confirmation code is: BMTN-ZDZB
Press ENTER to open your browser or submit your device code here: https://login.docker.com/activate

Waiting for authentication in the browser…

failed to store tokens: error storing credentials - err: exec: “docker-credential-desktop”: executable file not found in $PATH, out: error storing credentials - err: exec: "docker-credential-desktop": executable file not found in $PATH, out:

Browser tell you!
Congratulations, you’re all set!

Your device is now connected.

Share docker version and docker info.

For public images like regular Postgres you don’t need docker login.

docker version
Client: Docker Engine - Community
 Version:           28.2.2
 API version:       1.50
 Go version:        go1.24.3
 Git commit:        e6534b4
 Built:             Fri May 30 12:07:26 2025
 OS/Arch:           linux/amd64
 Context:           default

Server: Docker Engine - Community
 Engine:
  Version:          28.2.2
  API version:      1.50 (minimum version 1.24)
  Go version:       go1.24.3

docker info
Client: Docker Engine - Community
 Version:    28.2.2
 Context:    default
 Debug Mode: false
 Plugins:
  buildx: Docker Buildx (Docker Inc.)
    Version:  v0.24.0
    Path:     /usr/libexec/docker/cli-plugins/docker-buildx
  compose: Docker Compose (Docker Inc.)
    Version:  v2.36.2
    Path:     /usr/libexec/docker/cli-plugins/docker-compose

Server:
 Containers: 2
  Running: 0
  Paused: 0
  Stopped: 2
 Images: 3
 Server Version: 28.2.2
 Storage Driver: overlay2
  Backing Filesystem: extfs
  Supports d_type: true
  Using metacopy: false
  Native Overlay Diff: false
  userxattr: false
 Logging Driver: json-file
 Cgroup Driver: cgroupfs
 Cgroup Version: 2
 Plugins:
  Volume: local
  Network: bridge host ipvlan macvlan null overlay
  Log: awslogs fluentd gcplogs gelf journald json-file local splunk syslog
 CDI spec directories:
  /etc/cdi
  /var/run/cdi
 Swarm: inactive
 Runtimes: io.containerd.runc.v2 runc
 Default Runtime: runc
 Init Binary: docker-init
 containerd version: 05044ec0a9a75232cad858027ca83437aae3f4da
 runc version: v1.2.5-0-g59923ef
 init version: de40ad0
 Security Options:
  seccomp
   Profile: builtin
  cgroupns
 Kernel Version: 6.1.105-linux.1-amd64-smp
 Operating System: Debian GNU/Linux 12 (bookworm)
 OSType: linux
 Architecture: x86_64
 CPUs: 2
 Total Memory: 1.924GiB
 Name: linux
 ID: 9413b0fe-2034-4b50-8e57-1a4d8f977a2d
 Docker Root Dir: /var/lib/docker
 Debug Mode: false
 Experimental: false
 Insecure Registries:
 Live Restore Enabled: false

WARNING: No swap limit support

A docker-compose.yml file would be useful for installing postgres.
I intend to set the port number, container creation and volumes. And as soon as you do this you also download image postgres.
Even entering password admin in the docker-compose.yml file would be useful.

Have you installed Docker Desktop and Docker CE on the same Debian Linux? Since there is only one client config by default, if you install Docker Desktop, it will change your client config and that will affect your Docker CE as well. Since the credential helper doesn’t exist, I also assume you deleted Docker Desktop already, but the client config was already changed. You can try to delete the $HOME/.docker folder (create a backup first if you have any custom settings there) and try the docker command again.

Yes, i tried to install Docker Desktop in the past, but the operation was not successful.
Yesterday reading in the community i tried this command sudo -E PATH=“$PATH” but it didn’t work.
I would also need Docker Desktop too, but surely my laptop is too old.
I try to do as you suggested.

I hope it helps.

I also changed the topic title to include the error message. “Docker login problem” doesn’t really say anything about the issues and it would be harder to notice for other users.

I’m not sure about the directory to delete. Could you indicate the precise path ?


I was also thinking that I could completely remove dokers and reinstall it.
Thanks for changing the title

I shared the reference in my previous post

You can use the variable on Linux to refer to the home directory. There is where the client config is in .docker, not in the Linux root