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``

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``”

I’ll appreciated if you can help me. Thanks.

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?

1 Like

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.

1 Like

Dude, you’re a life savior. It worked!!! Thank a lot. I’ve been trying to fix this for days. I really appreciated it!

:dart: :dart: :dart:

1 Like

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!

Thanks anyway!!! :slightly_smiling_face: :call_me_hand:

3 Likes

So you had that :slight_smile: But I am glad you solved it.

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.

How exactly did you try to install?

It still wants my GPG key, so I generate a new one after delete everything related to it, and it now works. even i unisntalled and purge. but after try evey suggestion in docker - Error saving credentials: error storing credentials - err: exit status 1, out: `error getting credentials - err: exit status 1 - Stack Overflow it somehow work but still error keep pop up in my desktop application

1 Like

Thank you very much! Spend the whole day trying to solve this

same thank you so much this is so hard to do from an arch perspective

If you recreate the gpg key. It will work just as fine.