Hey guys, I just changed my docker toeken, but I can’t login and it displays this message “Error saving credentials: error storing credentials - err: exit status 1, out: error getting credentials - err: exit status 1, out: exit status 2: gpg: decryption failed: No secret key``”
Did you change anything else besides your token? If you haven’t solved it yet, could you tell us more about what you did and your environment? Is it in the cloud, on Wondows, MacOS or Linux? Is it Docker Desktop or just Docker engine on Linux?
Thank you for your responde, Ákos. Well, I Installed Docker Desktop in Arch Linux and when I open Docker Desktop in my terminal appearts “Cannot connect to the Docker daemon at unix:///home/imjavierpalma/.docker/desktop/docker.sock. Is the docker daemon running?”. When a reboot my machine and I only use Docker in the terminal the error message disapears. So, I uninstalled Docker Desktop from my machine, but now when I open the terminal and type “docker ps -a” it displays the same error “Cannot connect to the Docker daemon at unix:///home/imjavierpalma/.docker/desktop/docker.sock. Is the docker daemon running?” and I already reinstall Docker. It only runs the Docker commands when I use “sudo su”.
Is this related to the authentication issue with the gpg error? Do you still have that?
If I understand you correcttly, you installed Docker on Arch Linux, then installed Docker Desktop. Docker Desktop create a virtual machine and adds a new Docker client. It can also change how the client authenticates. You can switch between Docker Desktop and the Docker daemon installed on the host by changing the context:
docker context ls
docker context use CONTEXTNAME
When you use sudo su, you have different contexts without docker desktop.
I solved it! I use Arch Linux. I went to $HOME/.docker and I deleted the config.json file. Then I type sudo systemctl restart docker and sudo systemctl enable docker. After that I type docker login and put my username and docker token and BOOM!
I have the same problem but for me, I can’t login even whatever i try to install serveral times delete everythings that i think relate to docker but it still not work.
Since this page ranks very highly when searching for this error, I wanted to add what worked for me.
I’m also on Arch Linux, and I got this error when trying to log in to AWS ECR using the AWS CLI.
For me, the solution was as simple as closing Docker Desktop completely. After that, I was able to complete the command with no issues. So before doing anything more complicated or destructive, try closing Docker Desktop while you are working with the CLI.