wincred missing from Windows Server 2019 image

mcarpenter's Avatar


04 Mar, 2019 02:04 PM

When building Docker images on the new Windows Server 2019 image, I was getting errors when trying to "docker login" to a private registry. I received the following initially (when using the --password-stdin docker login switch, otherwise you'll get a different error): WARNING! Your password will be stored unencrypted in C:\Users\appveyor\.docker\config.json

So, I scripted the creation of that file, setting "credsStore": "wincred". After doing that, I got the following error: Error saving credentials: error storing credentials - err: exec: "docker-credential-wincred": executable file not found in %PATH%

Then I included a copy of docker-credential-wincred.exe in my source repository, and ran Copy-Item "$env:APPVEYOR_BUILD_FOLDER\tools\wincred\docker-credential-wincred.exe" -Destination "C:\program files\docker"

Things seemed to work fine after that. I think C:\program files\docker\docker-credential-wincred.exe should probably exist by default to save others the trouble. Let me know if you have any questions - thanks!

  1. 1 Posted by Ilya Finkelshte... on 05 Mar, 2019 12:45 AM

    Ilya Finkelshteyn's Avatar

    Thanks a lot for the feedback! I would recommend this script instead of checking binary into repo:

    Write-Host "Downloading docker-credential-wincred"
    (New-Object Net.WebClient).DownloadFile('', "$env:TEMP\")
    Expand-Archive -Path "$env:TEMP\" -DestinationPath "$env:ProgramFiles\Docker" -Force
    Remove-Item "$env:TEMP\"

    You can run it at install stage. And yes, we will consider adding it into the image.

  2. 2 Posted by mcarpenter on 22 Apr, 2019 12:30 PM

    mcarpenter's Avatar

    Sorry for the delay - this seems to have done the trick. Thanks!

  3. mcarpenter closed this discussion on 22 Apr, 2019 12:30 PM.

Comments are currently closed for this discussion. You can start a new one.

Keyboard shortcuts


? Show this help
ESC Blurs the current field

Comment Form

r Focus the comment reply box
^ + ↩ Submit the comment

You can use Command ⌘ instead of Control ^ on Mac