podman: Error: failed to parse "X-Registry-Auth" header

Viewed 1128

I'm trying to use podman for the first time (under Mac OS with podman machine, but this is probably irrelevant). When I try to start busybox image as a test, like described in Introduction:

podman run -it docker.io/library/busybox

I get the following error:

Error: failed to parse "X-Registry-Auth" header for /v3.3.1/libpod/images/pull?alltags=false&arch=&authfile=&os=&password=&policy=missing&quiet=false&reference=docker.io%2Flibrary%2Fbusybox&username=&variant=: error storing credentials in temporary auth file (server: "https://index.docker.io/v1/", user: ""): key https://index.docker.io/v1/ contains http[s]:// prefix

(podman version 3.3.1)

2 Answers

The reason was that I had ~/.docker/config.json file created by Docker Desktop. It had empty entry for docker.io registry, without credentials, which was causing this error.

As this file had no valuable configuration (mostly default values), I deleted it and problem no longer occured.

% podman run -it docker.io/library/busybox
Trying to pull docker.io/library/busybox:latest...
Getting image source signatures
Copying blob sha256:8ec32b265e94aafb0d43ab71f1d8f786122c19afb37d25532aea169f414f8881
Copying blob sha256:8ec32b265e94aafb0d43ab71f1d8f786122c19afb37d25532aea169f414f8881
Copying config sha256:42b97d3c2ae95232263a04324aaf656dc80e7792dee6629a9eff276cdfb806c0
Writing manifest to image destination
Storing signatures
/ #

Edit ~/.docker/config.json file and remove https://

Config before (not working)

{
{
  "credsStore" : "desktop",
  "auths" : {
    "https://index.docker.io/v1/" : {

    },
    "xxx-yyy-docker.artifactory.zzzz.com" : {

    },
    "registry.gitlab.zzzz.com" : {

    }
  },
  "credHelpers" : {
    "gcr.io" : "gcloud",
    "europe-west1-docker.pkg.dev" : "gcloud"
  }
}

After (working ok)

{
{
  "credsStore" : "desktop",
  "auths" : {
    "index.docker.io/v1/" : {

    },
    "xxx-yyy-docker.artifactory.zzzz.com" : {

    },
    "registry.gitlab.zzzz.com" : {

    }
  },
  "credHelpers" : {
    "gcr.io" : "gcloud",
    "europe-west1-docker.pkg.dev" : "gcloud"
  }
}
Related