Credential saving error when connecting to service on docker
Asked Answered
G

3

26

I am on a silicon chip Macbook Pro running macOS Monterey version 12.0.1 and the following error occurs on attempting to connect to the NGC service using sudo docker login ncvr.io.

Error saving credentials: error storing credentials - err: exit status 1, out: `Post "http://ipc/registry/credstore-updated": dial unix /var/root/Library/Containers/com.docker.docker/Data/backend.sock: connect: no such file or directory`
Gent answered 16/6, 2022 at 12:29 Comment(0)
D
62

You will need to have docker running. Try opening Docker Desktop and attempt your login again.

Doting answered 3/7, 2022 at 10:34 Comment(0)
S
33

i had the same issue and could resolve it by deleting the ~/.docker/config.json file. originally it contained only one entry being "credStore=desktop". after deletion, and trying to login again, it changed to "osxkeychain".

source: https://github.com/docker/docker-credential-helpers/issues/213

Salsala answered 18/7, 2022 at 8:51 Comment(5)
Surprisingly it worked also for me, but I don't understand why :(Ocher
Also worked for me in macOS.Curzon
Simply opening Docker Desktop, a newly upgraded version on my system I think, fixed the issue for me. My ~/.docker/config.json file had set "credsStore": "desktop" for what it's worth.Biscay
Thanks. It worked for me on Docker version 4.13.0 macOsPalladino
This can be used when you are not using docker desktop anymore.Bosworth
F
1

I find that running the following (assuming you are already on the command line) helps

mv ~/.docker/config.json ~/.docker/config.json.old
cat ~/.docker/config.json.old | sed /credsStore/d > ~/.docker/config.json
rm ~/.docker/config.json.old

or, all in one go as part of my run script

mv ~/.docker/config.json ~/.docker/config.json.old; cat ~/.docker/config.json.old | sed /credsStore/d > ~/.docker/config.json; rm ~/.docker/config.json.old
Flavour answered 18/10, 2023 at 7:12 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.