Skip to content

Docker Push Authentication Error (Troubleshooting)

When CLI tries to push Docker image to registry, authentication error may occur when Docker doesn't send credentials to the registry.

Resolution:

MacOS

  1. Open Docker Desktop
  2. Go to Settings → Docker Engine
  3. Add to JSON configuration:
json
{
  "insecure-registries": ["host.docker.internal:49984"]
}

Complete example:

json
{
  "builder": {
    "gc": {
      "defaultKeepStorage": "20GB",
      "enabled": true
    }
  },
  "features": {
    "buildkit": true
  },
  "insecure-registries": [
    "host.docker.internal:49984"
  ]
}
  1. Click Apply & Restart

Linux

  1. Edit /etc/docker/daemon.json (create if doesn't exist):
json
{
  "insecure-registries": ["localhost:49984"]
}
  1. Restart Docker:
bash
sudo systemctl restart docker

Windows

  1. Open Docker Desktop
  2. Go to Settings → Docker Engine
  3. Add to JSON configuration:
json
{
  "insecure-registries": ["host.docker.internal:49984"]
}
  1. Click Apply & Restart

Purpose: Allows Docker to send requests to local proxy which handles authentication.

E2B Documentation • Generated from e2b.dev/docs