docker / docker-credential-helpers

Programs to keep Docker login credentials safe by storing in platform keystores
MIT License
1.05k stars 166 forks source link

Can't sign in to Docker Desktop, constantly signing me out immediately after sign in. #325

Closed Bird87ZA closed 2 months ago

Bird87ZA commented 2 months ago

When I open Docker Desktop, I am not signed in.

Clicking on the sign in button opens a sign in window in the browser. I then complete sign in and get a You're almost done success screen, which then redirects to Docker Desktop:

image

I see the Docker Desktop screen for probably a second (blurred out), and then I get redirected back to the browser, and I get a You've been signed out page.

image

I also tried logging in with docker login and I get this error:

Error saving credentials: error storing credentials - err: exit status 1, out: `status code not OK but 500: {"message":"getting credential helper update: You must be a member of the \u003cORG\u003e organization. Log in with a different account, or contact your organization owner to add your account."}

Any help will be appreciated

thaJeztah commented 2 months ago

Looking at that error message, I don't think this has to do with the credentials-helper;

You must be a member of the <ORG> organization. Log in with a different account, or contact your organization owner to add your account.

I suspect your Docker Desktop installation is configured to enforce logging in, and to only allow log-in for users that are part of specific orgs, but it seems like it's configured to only allow an org named <ORG> (so perhaps someone made a mistake and copied an example value?) https://docs.docker.com/security/for-admins/configure-sign-in/#create-a-registryjson-file-to-enforce-sign-in

Not sure why the error would show up as a JSON string there though, but perhaps the error is not returned in the expected format (therefore printed "as-is").

Bird87ZA commented 2 months ago

Ah, went to look at the file location and there was a registry.json file.

Seems the corporate mac I'm using (I have permission to use it for private use) has this file added. Will get permission to remove it. Thanks for your help.

thaJeztah commented 2 months ago

Thanks! FWIW, I posted this on our internal slack, and the team was also looking at some possible regressions / issues around authentication in Docker Desktop, so if you run into issues, let us know (best to open a ticket in github.com/docker/for-mac with a diagnostics report)