-
Notifications
You must be signed in to change notification settings - Fork 289
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
docker always restores credStore desktop #9843
Comments
Issues go stale after 90 days of inactivity. Prevent issues from auto-closing with an If this issue is safe to close now please do so. Send feedback to Docker Community Slack channels #docker-for-mac or #docker-for-windows. |
/remove-lifecycle stale |
Would be nice to be able to use the windows credential store similar to how |
/remove-lifecycle stale |
Facing the exact same issue on Windows 10 (WSL2). I can not use private hosted containers because of this issue... |
The windows credentials store does not work for us, because our build script runs elevated: docker/cli#2682 (comment)
It works when I manually remove the Please either fix the bug that elevated shells can't login, or that |
Having the same issue. Resets the |
This no longer happens to me (I work on multiple windows PCs with WSL 2, and change computers often (reformat windows or get new PC so have to set up everything from scratch again)
I recommend anyone having issues to completely uninstall docker, (or try use the purge option in docker first) and/or remove WSL then reinstall WSL, and make sure you enable WSL2, then reinstall docker, and enable docker integration with WSL (inside the Docker desktop settings). After doing the above, docker in WSL uses Windows credential manager and works fine. |
I just faced this issue, and found a workaround: First edit |
I tried a similar write protect approach however docker crashed on start... |
Why don't you want to use the credentials store? Renaming or removing |
Stolen credentials are not a concern in my use case, as there are no sensitive credentials stored (placeholder credentials in a dev environment). I wanted to share the credentials with a set of containers, without having to configure more than the path to the credential config file. Within the container context, the credStore is not available, so auth just fails. |
@StevenLiekens
The windows credentials store does not work for us, because our build script runs elevated: docker/cli#2682 (comment)
It works when I manually remove the Please either fix the bug that elevated shells can't login, or that And from a philosophical standpoint, the software should do what I tell it to, not the other way around. Why is there a config file if you're just gonna ignore and overwrite it yourself? |
@StevenLiekens I am experiencing this issue using a corporate IT provisioned machine, the problem with the creds store is that it is somehow blocked by my IT policy: If i go in and remove the credsStore field from this file and docker build again then all is well. We don't actually need creds at all, the images we are using are either all public or pulled from a private registry through the VPN without credentials, we only upload images through a CI pipeline so no creds are needed. The problem is every time we restart docker it injects the credsStore back into the WSL environment. If it was possible to disable this feature via docker desktop config, or if it was possible to set the file in windows that was then copied to wsl so we could then update the file there that would be helpful. As it is now we have to have a special script which wipes out the credsStore field before we docker build every time. Workaround welcome! |
Issues go stale after 90 days of inactivity. Prevent issues from auto-closing with an If this issue is safe to close now please do so. Send feedback to Docker Community Slack channels #docker-for-mac or #docker-for-windows. |
Adding some activity! |
/remove-lifecycle stale |
@justinmchase sadly this bot only reacts the exact comment /remove-lifecycle stale |
Got it thanks. |
I'm having the same issue. Is there any known workaround? Making the file read-only doesn't work for me as it causes docker to crash on start. |
As a workaround, one can specify credential helpers for private registries explicitly. I did that because the default credential store does not support AWS ECR tokens (they are to long):
The token for the ECR registry will then be stored in plaintext in the From my experience, Docker Desktop usually does not overwrite custom |
I'm having the same issue. This seems like such a simple fix!!! Please correct me if I'm wrong: any developer feedback on this would be nice! |
Issues go stale after 90 days of inactivity. Prevent issues from auto-closing with an If this issue is safe to close now please do so. Send feedback to Docker Community Slack channels #docker-for-mac or #docker-for-windows. |
Please keep it open |
/remove-lifecycle stale |
Using the comments in the linked issue: docker/for-mac#6295, one solution is to set The settings.json file can be found under "credentialHelper": "docker-credential-wincred.exe", to: "credentialHelper": "docker-credential-ecr-login.exe", This solved the issue both for Docker (e.g. |
@aberenshtein See here for the Mac OS equivalent: docker/for-mac#6295 (comment). |
The release notes for Docker Desktop 4.19.0 notes that "Docker Desktop now stops overriding .docker/config.json credsStore keys on application start.". This appears to work for the Windows config.json file. Unfortunately it doesn't fix the problem for the WSL config.json file, which (for me at least) is entirely replaced each time Docker Desktop is restarted (using version 4.20.0). I'm also unable to use the suggested workarounds in this issue. Setting |
this is the only solution. give this man more hearts |
You are right, this step solves a lot of the issues with Docker in WSL2 |
For me this issue seems to be because I've enabled Disabling systemd in that file and then restarting wsl and docker-desktop fixes the issue but obviously I want systemd on |
+1 on mac There appear to be two interacting issues here. One is: "why the hell do I even need to delete credsStore from the config in the first place?". The second is: "Why the hell does the desktop app keep adding it back whenever I delete it?" It blows my mind that I have used this same fix across multiple machines (Windows and Mac) to fix seemingly unrelated issues. It also blows my mind that the desktop software won't respect my wishes and just leave the config file alone. |
+1 on mac, I have my |
+1 for Debian. My |
+1 for Ubuntu. This has been open for three years? I can't believe people pay for this software. |
I for my part no longer pay. I have uninstalled Docker Desktop, so my company pays one license less. |
+1 for Mac. |
/remove-lifecycle stale |
I resolved this on Ubuntu 23.10 (Mantic Minotaur) by adding the
|
In Windows, this Docker config still gives me an ECR authentication problem:
To make it works, I need to delete the |
This problem still exists |
We had made some fixes in this area, namely to the issue that a valid value in However the issue reported here - that if credsStore is set to |
On Mac with docker desktop 4.33 and docker cli 27.1.1, I'm facing the issue that every time docker desktop starts it resets 'credStore' to 'credsStore', which is breaking the login to my Azure Container Registry. |
I have been experiencing a very similar issue to @rsanchezc-pg
Docker version: 27.1.1, build 63125853e3 |
4.34.0 has been released with a fix for this issue, more information o the release notes. I'll be closing this issue, but if the problem persists please open a fresh issue! |
took years to fix |
I can confirm that the issue is still reproducible. Docker: 27.2.1, build 9e34c9bb39 |
Definitely is still changing the value of "credsStore" (I am running v4.35.1). Problem is not solved. Before: After restarting I just tried it. |
I just made the file read only and this fixed the problem. I don't know what side effects it may cause but it's been working for me since the last comment. |
I came from the future to say that the year is 2225 and it is still changing the value of "credsStore" . |
Same here, I need to use |
I don't want to use the default
credStore
"desktop" on my development machine. The issue docker/docker-credential-helpers#95 guides me to set thecredStore
/credsStore
value to""
instead of"desktop"
, but it doesn't seem to have any effect while docker is running. Restarting docker will reset this value to"desktop"
.Please fix this.
The text was updated successfully, but these errors were encountered: