Error : Command failed: docker-credential-desktop get

Getting the error when trying to push the image

Also when trying to push the image to a private registry (zyte) I get also an auth error ( Error failed to authorize: failed to fetch oauth token)

Already changed my ~/.docker/config.json file as follows :

{
“auths”: {},
“credStore”: “desktop”,
“currentContext”: “desktop-linux”
}

following this:

also tried replacing “desktop” for “desktop.exe” and removing the credStore with no success

I would much appreciate your help

I got the same error on macOS when I tried to push an image with a wrong name. I just tagged an image as “localhost/test”. And tried to push it. When I tagged an image to push it ot my actual docker hub repository, it worked.

How did you try to push the image and which one? Since the error message appears in the desktop app, I guess you tried from the “Actions” menu and push one of the too images, but the only image you could push there to Docker Hub is the second image which was created 2 years ago. Is this really what yo want to push? Since you then say you also try to push to a private registry, I assume you first tried to push the other image to Docker Hub.

The oauth issue could be related or not. I’m not sure.

Have you tried everything from command line as well?

I have never see that advice and I don’t think it is necessary. I’m not even sure it would be valid

Thanks for your answer. Yes, I am trying to push the first image. Newbie question: why it is not possible to push the first image?

Sorry, it sems I forgot to edit that part before sending the message. So I wanted to say that the second image is the only one you could push to Docker Hub, not in general. I will fix it in my original post too. The other image could be pushed to your private registry, but you would need to log in from the command line. I don’t have a private registry right now, so I can’t test it at the moment.