Skip to content

Docker Login Issue On Windows When Deploying Model

When deploying your model to Highwind, you need to use the docker login command.

You might see this error when trying to login:

Error saving credentials: error storing credentials - err: exit status 1, out: "The stub received bad data."

This is due to the Windows Credentials Manager (WCM) having a limited number of characters per credential. As a result, it truncates the credential causing the bad data error.

Work Around

We need to edit your Docker configuration file to not use the WCM.

⚠️ This will store your credentials in plain text inside of the configuration file. This is insecure and should only be used a temporary workaround. ♻️ We'll return your configuration file to default after you have deployed by deleting it. Docker will restore the file.

Method 1

  • Open up PowerShell and paste:

    echo '{"auths": {"https://index.docker.io/v1/": {}}, "HttpHeaders": { "User-Agent": "Docker-Client/19.03.12 (windows)"}}' > ~\.docker\config.json
    
  • You might need to restart Docker Desktop for the new configuration file to take effect.

  • Delete the configuration file (after you have deployed):

    Remove-Item ~\.docker\config.json
    
  • Restart Docker Desktop for the default configuration file to take effect.

Method 2

  • Using File Explorer, go to the folder C:\Users\YOUR-USER-NAME\.docker
  • Inside you'll see the config.json file.
  • Open it with VS Code or whichever text editor.
  • Or use PowerShell to open it with VS Code or Notepad:
code ~\.docker\config.json
notepad ~\.docker\config.json
  • Delete all lines with credsStore e.g. "credsStore": "desktop", but keep the rest.

    Before:

    {
        "auths": {
        },
        "credsStore": "desktop", 👈 Delete this entire line
        "currentContext": "default",
        "plugins": {
            "-x-cli-hints": {
                "enabled": "true"
            }
        }
    }
    

    After:

    {
        "auths": {
        },
        "currentContext": "default",
        "plugins": {
            "-x-cli-hints": {
                "enabled": "true"
            }
        }
    }
    
  • You might need to restart Docker Desktop for the new configuration file to take effect.

  • Delete the configuration file (after you have deployed):

  • Delete C:\Users\YOUR-USER-NAME\.docker\config.json

  • or use PowerShell

    Remove-Item ~\.docker\config.json
    
  • Restart Docker Desktop for the default configuration file to take effect.