Cannot pull images when logged in to Docker Desktop (Status 500: unauthorized: incorrect username or password)
See original GitHub issueTest Containers 1.16.3 on Docker Engine 20.10.12 with Docker Desktop using WSL2 Backend on Windows 21H1.
When I am logged in to my account in Docker Desktop, Test Containers can no longer pull images from Docker Hub. Once I log out of my account, Test Containers is able to pull images as expected.
com.github.dockerjava.api.async.ResultCallbackTemplate - Error during callback
com.github.dockerjava.api.exception.InternalServerErrorException: Status 500: {"message":"Head \"https://registry-1.docker.io/v2/testcontainers/ryuk/manifests/0.3.3\": unauthorized: incorrect username or password"}
at org.testcontainers.shaded.com.github.dockerjava.core.DefaultInvocationBuilder.execute(DefaultInvocationBuilder.java:247)
at org.testcontainers.shaded.com.github.dockerjava.core.DefaultInvocationBuilder.lambda$executeAndStream$1(DefaultInvocationBuilder.java:269)
at java.base/java.lang.Thread.run(Thread.java:833)
I think my Docker installation is fine, as I can pull images from the terminal when I am logged in to Docker Desktop. I don’t want to log out every time I use Test Containers. How can I fix this issue?
Logs (on INFO): https://pastebin.com/fyExxi76
Logs (on DEBUG): https://pastebin.com/b4H283fL
Issue Analytics
- State:
- Created 2 years ago
- Reactions:1
- Comments:28 (11 by maintainers)
Top Results From Across the Web
Unauthorized: incorrect username or password
You can do this by signing out from the system tray icon, or by logging in at a command prompt, using the syntax...
Read more >I have added testcontainer in spring boot app - Stack Overflow
I have installed docker desktop and logged it using docker desktop And then try using cli. When Running it Getting the below error....
Read more >Fix docker ERROR: unauthorized: incorrect username or ...
1. Open cmd and type “docker logout” and you'll get this message. $ docker logout. Removing login credentials for https://index.
Read more >Docker Tip #67: Incorrect Username or Password When ...
Using Docker to pull a public image should not require authentication but if your Docker Hub login credentials are bad it will fail....
Read more >Troubleshooting errors with Docker commands when using ...
Error : "Filesystem Layer Verification Failed" when pulling images from Amazon ECR ... authenticated to Docker using the aws ecr get-login-password command.
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Based on the idea behind the PR I tried the following workaround with the current release and it works for me on Windows:
Would anyone affected like to give it a try as well?
That worked for me on M1 Macbook Pro. It added an
{"auths":{"index.docker.io":{}}}
entry in my~/.docker/config.json
file. Thereafter the workaround persists across, restarts, etc.