docker / docker/docker-credential-helpers
Windows docker login, "stub received bad data"
Nobody has claimed this yet.
- Dominant language
- Go
- Stars
- 1.3k
- Forks
- 195
- Avg merge
- 1d 20h
- Merged PRs (30d)
- 5
Description
Description
On windows server 2022, when using docker login so I can push an image to ecr, I get this weird error:
Error saving credentials: error storing credentials - err: exit status 1, out: `The stub received bad data.`
There's lots of recommendations to clear or remove the .docker\config.json file, but that doesn't fix the issue.
Reproduce
- Start a windows 2022 server ec2 instance in aws.
- Install docker for windows
- Switch to windows containers
- (Get-ECRLoginCommand).Password | docker login --username AWS --password-stdin my-ecr-am.amazonaws.example.com
Expected behavior
No response
docker version
Client:
Cloud integration: v1.0.33
Version: 24.0.2
API version: 1.43
Go version: go1.20.4
Git commit: cb74dfc
Built: Thu May 25 21:53:15 2023
OS/Arch: windows/amd64
Context: default
Server: Docker Desktop 4.20.0 (109717)
Engine:
Version: 24.0.2
API version: 1.43 (minimum version 1.24)
Go version: go1.20.4
Git commit: 659604f9
Built: Thu May 25 21:52:13 2023
OS/Arch: windows/amd64
Experimental: false
docker info
Client:
Version: 24.0.2
Context: default
Debug Mode: false
Plugins:
buildx: Docker Buildx (Docker Inc.)
Version: v0.10.5
Path: C:\Program Files\Docker\cli-plugins\docker-buildx.exe
compose: Docker Compose (Docker Inc.)
Version: v2.18.1
Path: C:\Program Files\Docker\cli-plugins\docker-compose.exe
dev: Docker Dev Environments (Docker Inc.)
Version: v0.1.0
Path: C:\Program Files\Docker\cli-plugins\docker-dev.exe
extension: Manages Docker extensions (Docker Inc.)
Version: v0.2.19
Path: C:\Program Files\Docker\cli-plugins\docker-extension.exe
init: Creates Docker-related starter files for your project (Docker Inc.)
Version: v0.1.0-beta.4
Path: C:\Program Files\Docker\cli-plugins\docker-init.exe
sbom: View the packaged-based Software Bill Of Materials (SBOM) for an image (Anchore Inc.)
Version: 0.6.0
Path: C:\Program Files\Docker\cli-plugins\docker-sbom.exe
scan: Docker Scan (Docker Inc.)
Version: v0.26.0
Path: C:\Program Files\Docker\cli-plugins\docker-scan.exe
scout: Command line tool for Docker Scout (Docker Inc.)
Version: v0.12.0
Path: C:\Program Files\Docker\cli-plugins\docker-scout.exe
Server:
Containers: 8
Running: 0
Paused: 0
Stopped: 8
Images: 74
Server Version: 24.0.2
Storage Driver: windowsfilter
Windows:
Logging Driver: json-file
Plugins:
Volume: local
Network: ics internal l2bridge l2tunnel nat null overlay private transparent
Log: awslogs etwlogs fluentd gcplogs gelf json-file local logentries splunk syslog
Swarm: inactive
Default Isolation: process
Kernel Version: 10.0 20348 (20348.1.amd64fre.fe_release.210507-1500)
Operating System: Microsoft Windows Server Version 21H2 (OS Build 20348.1547)
OSType: windows
Architecture: x86_64
CPUs: 4
Total Memory: 15.86GiB
Name: EC2AMAZ-H68PGQ1
ID: 3cc58b8c-583d-4ff9-9632-529b7596c882
Docker Root Dir: C:\ProgramData\Docker
Debug Mode: false
Experimental: false
Insecure Registries:
127.0.0.0/8
Live Restore Enabled: false
Additional Info
No response
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Reproduce the Windows Server 2022 failure with the shown docker login command, then trace how Docker reaches credential storage and the .docker\config.json configuration. Done means identifying and fixing the credential-storage failure so ECR login completes without “The stub received bad data”; the issue names no project file or test.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- aws, docker, go
- Domain
- authentication, cli, security
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 35/100