ERROR: failed to solve: error getting credentials - err: exit status 1, out: ``

MacOS - I just had to change the docker config file.
The “credsStore” was “desktop” and changed it to “osxkeychain”.
used nano to do it. sudo nano ~/.docker/config.json

This was the one that worked for me too (MacBook M2, MacOS 15.0 beta).

(I used MacVim though :laughing:)

THANK YOU. This worked, 12.5.1 Monterey

My problem was that I was trying to run a script that contained sudo docker commands, but actually, my user (without sudo) was the owner of the $HOME/.docker folder which contains the credentials. Be sure to run with sudo if you always had, or without sudo if you always had. Don’t mix these things, either one or the other, depending on how you configured your machine; deleting the .docker folder might also help.