'how can i delete docker-credential-pass

I have a problem with docker login and pass, when I can't find a solution to this problem I decide to uninstall the pass

I delete pass, config.json but when I want to connect a docker hub

sudo docker login

Login with your Docker ID to push and pull images from Docker Hub. If you don't have a Docker ID, head over to https://hub.docker.com to create one.

Error saving credentials: error storing credentials - err: no credentials server URL, out: no credentials server URL

sudo docker logout

Removing login credentials for https://index.docker.io/v1/

WARNING: could not erase credentials:

https://index.docker.io/v1/: error erasing credentials - err: exit status 1, out: pass not initialized: exec: "pass": executable file not found in $PATH:

I don't know what I can do

can anyone help me to solve this problem?



Solution 1:[1]

Deleting the file /usr/local/bin/docker-credential-osxkeychain worked for me.

rm /usr/local/bin/docker-credential-osxkeychain

If the above one doesn't work then try to Remove the line "credsStore": "osxkeychain" from ~/.docker/config.json

Solution 2:[2]

I was also facing the same issue but I'm using github container registry and In my case there was no credentials in config.json.

Note: This scenario may be created when you try to logout for other container repository service(e.g docker hub) and login to another (In my case ghcr.io which is github)

Solution: Logout from old service if you have already login:

docker logout

Now ename docker-credential-secretservice e.g

sudo mv /usr/bin/docker-credential-secretservice /usr/bin/docker-credential-secretservice.broken

Next try to logout now.

sudo docker logout

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1 Ashok
Solution 2 Vinay Kumar