-
Notifications
You must be signed in to change notification settings - Fork 283
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
Update to 2.4.0.0: docker login from WSL2 distro fails with .../docker-credential-desktop.exe: Invalid argument #9061
Comments
I have this issue as well. Docker Desktop Version: 2.4.2.0 (48975) I was able to get it to work by setting
This could be related to #9278 as well. I was able to set
|
For me, have this in my ~/.docker/config.json fixed docker-credentials errors. {
"_credSstore": "desktop",
"experimental": "enabled"
} Note the underscore, without the underscore I can't Warning, the file seems to update itself... (after docker update ? wsl --shutdown ?) No related to my /etc/wsl.conf configuration where I have disable some options...
Original post: #6652 (comment) But is not normal to have to change this config.json manually... |
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 Just ran into this on a coworkers machine. Latest docker for win, latest version of windows, WSL2.
in |
Anyone knows which executables from the Windows-side are necessary for authentication to work? Enabling I tried adding
unfortunately without success. EDIT: Adding these directories to path actually did the trick, Docker authenticates using the credentials from Windows without having to use
|
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 |
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 Remains an issue |
This just worked for me, but remains to be seen how sustainable it is. Would like a proper fix at some point though.. the perils of using windows 🤒 |
Same issue, since I installed Windows 11, I have:
|
Hi @olivierchatry, try to remove the file: $HOME/.docker/config.json, it worked for me. -> Make sure that you backup the file first.... |
@thaylongs thanks ! but it did not help. Just running the command give me the same results : Tried unstalling and resintalling, still the same error. Update, running it in a normal window shell does not give me any error : So it is really about wsl. |
Turning off buildkit ( "buildkit": false in json config ) made it work. Would be great if this can be fixed. |
So, turn out, I installed WSl using the new app store from windows 11, and this seems to not work correctly with docker desktop. Uninstalled it ( it work alongside the normal "add remove feature" way of installing ), and then everything working find and dandy. |
I was able to get it to work via changing the symlink for docker-credential-desktop.exe in the wsl /usr/bin:
The existing symlink pointed to a different executable that was broken:
|
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 |
I am getting a similar error message when doing WSL2 $ docker pull ubuntu
Using default tag: latest
/usr/bin/docker-credential-desktop.exe: Invalid argument
latest: Pulling from library/ubuntu
Digest: sha256:26c68657ccce2cb0a31b330cb0be2b5e108d467f641c62e13ab40cbec258c68d
Status: Image is up to date for ubuntu:latest
docker.io/library/ubuntu:latest Windows Powershell Get-WinEvent 'Microsoft-Windows-AppLocker/*' -MaxEvents 100000 | Where LevelDisplayName -eq 'Error' | Format-Table -Wrap
ProviderName: Microsoft-Windows-AppLocker
TimeCreated Id LevelDisplayName Message
----------- -- ---------------- -------
11-05-2022 12:53:36 8004 Error \\WSL$\UBUNTU\MNT\WSL\DOCKER-DESKTOP\CLI-TOOLS\USR\BIN\DOCKER-CREDENTIAL-DESKTOP.EXE was prevented from running.
11-05-2022 12:45:17 8004 Error \\WSL$\UBUNTU\MNT\WSL\DOCKER-DESKTOP\CLI-TOOLS\USR\BIN\DOCKER-CREDENTIAL-DESKTOP.EXE was prevented from running.
11-05-2022 11:03:33 8004 Error \\WSL$\UBUNTU\MNT\WSL\DOCKER-DESKTOP\CLI-TOOLS\USR\BIN\DOCKER-CREDENTIAL-DESKTOP.EXE was prevented from running. |
this solved my problem - https://forums.docker.com/t/docker-credential-desktop-exe-executable-file-not-found-in-path-using-wsl2/100225/5
|
It's not a solution. It only appears to work because The number of people who implemented this "fix" is worrisome. update But in my experience this symlink gets destroyed after every reboot, and recreating it can't be automated because the command requires root. There is a variation on this that does not require root: add the cli tools to your PATH. PATH="/mnt/c/Program Files/Docker/Docker/resources/bin":$PATH You can put this in your |
Hm… I just randomly started hitting this as well, but it’s not just
|
FYI came across this: microsoft/WSL#6170 seems a common problem with docker at times, but sometimes also git? 🤷♀️ |
I just ran into this after onboarding to another project and switching IDEs. For some reason VSCode sets up the PS into WSL env without this issue, while I have to try workarounds posted here, to get it to work within IntelliJ! |
@tlgDJPorv thanks for sharing. AppLocker was also the problem in our case! |
There hasn't been any activity on this issue for a long time. Prevent issues from auto-closing with a /lifecycle stale |
Windows 11, Version 22H2 (OS Build 22621.1105) I am still having this issue /remove-lifecycle stale |
There hasn't been any activity on this issue for a long time. Prevent issues from auto-closing with a /lifecycle stale |
Having this same issue. |
@sliekens's suggestion finally fixed the problem for me where all previously mentioned fixes failed |
I am not sure if this helps anyone, but none of the recommended fixes or workarounds solved this issue for me.
To fix the
After restarting Docker Desktop and the WSL distribution, the credential-store errors vanished. See the image below for what my configuration looks like in the Docker Desktop GUI. It seems odd to me that I would have to explicitly enable Ubuntu when the default WSL distro was enabled. |
Expected behavior
Docker login, docker-compose work as before
Actual behavior
Docker login, docker-compose fail from WSL2 distro
Information
Steps to reproduce the behavior
(from powsershell)
(from wsl2 distro)
docker login -> fails
/c/Program Files/Docker/Docker/resources/bin/docker-credential-desktop.exe: Invalid argument
Error saving credentials: error storing credentials - err: exit status 1, out: `
docker-compose up (only hello-world as service) -> fails
/c/Program Files/Docker/Docker/resources/bin/docker-credential-desktop.exe: Invalid argument
Traceback (most recent call last):
File "docker/credentials/store.py", line 80, in _execute
File "subprocess.py", line 411, in check_output
File "subprocess.py", line 512, in run
subprocess.CalledProcessError: Command '['/c/Program Files/Docker/Docker/resources/bin/docker-credential-desktop.exe', 'get']' returned non-zero exit status 1.
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "docker/auth.py", line 264, in _resolve_authconfig_credstore
File "docker/credentials/store.py", line 35, in get
File "docker/credentials/store.py", line 93, in _execute
docker.credentials.errors.StoreError: Credentials store docker-credential-desktop.exe exited with "".
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "bin/docker-compose", line 3, in
File "compose/cli/main.py", line 67, in main
File "compose/cli/main.py", line 126, in perform_command
File "compose/cli/main.py", line 1070, in up
File "compose/cli/main.py", line 1066, in up
File "compose/project.py", line 615, in up
File "compose/service.py", line 356, in ensure_image_exists
File "compose/service.py", line 1267, in pull
File "compose/progress_stream.py", line 99, in get_digest_from_pull
File "compose/service.py", line 1234, in _do_pull
File "docker/api/image.py", line 396, in pull
File "docker/auth.py", line 48, in get_config_header
File "docker/auth.py", line 324, in resolve_authconfig
File "docker/auth.py", line 235, in resolve_authconfig
File "docker/auth.py", line 281, in _resolve_authconfig_credstore
docker.errors.DockerException: Credentials store error: StoreError('Credentials store docker-credential-desktop.exe exited with "".')
[3279] Failed to execute script docker-compose
/c/Program Files/Docker/Docker/resources/bin/docker-credential-desktop.exe: Invalid argument
The text was updated successfully, but these errors were encountered: