-
Notifications
You must be signed in to change notification settings - Fork 341
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
Windows configuration problems for Windows Server 2022 #916
Comments
Update: I've tried setting the credsStore value to Setting
However, running the docker login command manually with the
From there, after some more tweaks, I was able to get this to work. In my case, the problem was related to the program not being accessible from the path for whatever reason. I've deleted the executable again, re-downloaded it to a new directory: C:\ECR Credentials Helper, then added that directory to the path and placed the executable there. My configuration resides under C:\Users\Administrator.aws and C:\Users\Administrator.docker. I did not use any env variables for the configuration of docker or AWS credentials. Hopefully, this helps those who stumble upon similar issues! |
I now managed to resolve the issues I've had with getting the credentials helper to play nicely. In my case, the issues related to using credentials helper as part of Gitlab CI (via Gitlab Runner binary running on the Windows Server 2022 machine). Because the runner ran under a SYSTEM user, the calls to docker (and therefore docker-credential-ecr-login.exe) were also ran within that system context. This meant that to get it all to work, I had to provide configuration not just for the local user (Users/Administrator), but also the system. Thanks to @Tim-Co's comment in #81, I was able to trace this configuration to The solution to configuring the credentials helper on WIndows Server, where docker runs under the SYSTEM context is therefore:
|
Hello,
I've spent about a day on debugging the issue now and I can't seem to be able to get the credentials helper to work on my Windows Server 2022 machine. Crucially, the setup uses the docker installation scripts from here and is set up to run the windows containers. I am not using Docker Desktop or WSL.
I might be missing something obvious, so apologies if that's the case, but it seems that no matter what I try, I keep getting the following error:
Steps I followed
C:\
(which is in PATH, running "docker-credential-ecr-login" in powershell shows the correct error message, see below).~\.aws\credentials
file to a standard format (and confirmed it works with aws cli).~\.docker\config.json
file to several different formats (see below) and verified that it is indeed the file used for docker configuration (basic auth credentials are placed there when executing aws cli commands, malformed json results in errors when trying to pull the image etc.).docker pull 12345678.dkr.ecr..../myimage
to no avail, each time the "no basic auth credentials comes up".Tested configurations in ~.docker\config.json
credsStore
credsStore (with empty auths)
credHelpers
credHelpers (with empty auths)
credsStore and credHelpers
credsStore and credHelpers (with empty auths)
Other things I've tried
Any help or shared experience would be greatly appreciated!
Error message when running `docker-credential-ecr-login`:
The command docker-credential-ecr-login was not found, but does exist in the current location. Windows PowerShell does not load commands from the current location by default. If you trust this command, instead type: ".\docker-credential-ecr-login". See "get-help about_Command_Precedence" for more details.
The text was updated successfully, but these errors were encountered: