slimtoolkit/slim · error

missing auth params

Error message

missing auth params

What it means

Creating/pushing an image index requires registry credentials. If neither UseDockerCreds is enabled nor an explicit account/secret pair is set, the handler fails fast with this error before attempting any remote calls.

Source

Thrown at pkg/app/master/command/registry/handler_image_index.go:80

				"exit.code": exitCode,
				"version":   v.Current(),
				"location":  fsutil.ExeDir(),
			})
		xc.Exit(exitCode)
	}
	xc.FailOn(err)

	if gparams.Debug {
		version.Print(xc, cmdName, logger, client, false, gparams.InContainer, gparams.IsDSImage)
	}

	if len(cparams.ImageNames) == 0 {
		xc.FailOn(fmt.Errorf("no image references for image index"))
	}

	if !cparams.UseDockerCreds &&
		!(cparams.CredsAccount != "" && cparams.CredsSecret != "") {
		xc.FailOn(fmt.Errorf("missing auth params"))
	}

	remoteOpts := []remote.Option{
		remote.WithContext(context.Background()),
	}

	remoteOpts, err = ConfigureAuth(cparams.CommonCommandParams, remoteOpts)
	xc.FailOn(err)

	nameOpts := []name.Option{
		name.WeakValidation,
	}

	if cparams.InsecureRefs {
		nameOpts = append(nameOpts, name.Insecure)
	}

	imageIndexRef, err := name.ParseReference(cparams.ImageIndexName, nameOpts...)

View on GitHub (pinned to 81940d17fa)

Solutions

  1. Set the credentials via the creds account/secret flags or params
  2. Enable UseDockerCreds to reuse the local Docker config credentials
  3. Ensure environment variables or CI secrets (REGISTRY_USER/REGISTRY_PASSWORD style) are actually set and non-empty
  4. Verify you are targeting a registry that doesn't require auth if pushing anonymously

Example fix

// before
CredsAccount: "", CredsSecret: "", UseDockerCreds: false
// after
CredsAccount: "myuser", CredsSecret: os.Getenv("REGISTRY_PASSWORD")
Defensive patterns

Strategy: validation

Validate before calling

if !UseDockerCreds && (CredsAccount == "" || CredsSecret == "") {
    return errors.New("provide creds or enable UseDockerCreds")
}

Prevention

When it happens

Trigger: Running the index create command with UseDockerCreds=false and CredsAccount or CredsSecret empty; credentials expected from flags/config/environment were never supplied.

Common situations: Private registry pushes without --creds or docker-creds; CI secrets not injected; typo in credential flag names; empty env vars in containerized runs.

Related errors


AI-assisted analysis of slimtoolkit/slim@81940d17fa (2026-08-31). Data as JSON: /api/errors/56c4a447e4b0ab7e. Report an issue: GitHub.