{"record":{"id":"56c4a447e4b0ab7e","repo":"slimtoolkit/slim","slug":"missing-auth-params","errorCode":null,"errorMessage":"missing auth params","messagePattern":"missing auth params","errorType":"validation","errorClass":null,"httpStatus":null,"severity":"error","filePath":"pkg/app/master/command/registry/handler_image_index.go","lineNumber":80,"sourceCode":"\t\t\t\t\"exit.code\": exitCode,\n\t\t\t\t\"version\":   v.Current(),\n\t\t\t\t\"location\":  fsutil.ExeDir(),\n\t\t\t})\n\t\txc.Exit(exitCode)\n\t}\n\txc.FailOn(err)\n\n\tif gparams.Debug {\n\t\tversion.Print(xc, cmdName, logger, client, false, gparams.InContainer, gparams.IsDSImage)\n\t}\n\n\tif len(cparams.ImageNames) == 0 {\n\t\txc.FailOn(fmt.Errorf(\"no image references for image index\"))\n\t}\n\n\tif !cparams.UseDockerCreds &&\n\t\t!(cparams.CredsAccount != \"\" && cparams.CredsSecret != \"\") {\n\t\txc.FailOn(fmt.Errorf(\"missing auth params\"))\n\t}\n\n\tremoteOpts := []remote.Option{\n\t\tremote.WithContext(context.Background()),\n\t}\n\n\tremoteOpts, err = ConfigureAuth(cparams.CommonCommandParams, remoteOpts)\n\txc.FailOn(err)\n\n\tnameOpts := []name.Option{\n\t\tname.WeakValidation,\n\t}\n\n\tif cparams.InsecureRefs {\n\t\tnameOpts = append(nameOpts, name.Insecure)\n\t}\n\n\timageIndexRef, err := name.ParseReference(cparams.ImageIndexName, nameOpts...)","sourceCodeStart":62,"sourceCodeEnd":98,"githubUrl":"https://github.com/slimtoolkit/slim/blob/81940d17fa112cc678e32209214bcb2355cb3004/pkg/app/master/command/registry/handler_image_index.go#L62-L98","documentation":"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.","triggerScenarios":"Running the index create command with UseDockerCreds=false and CredsAccount or CredsSecret empty; credentials expected from flags/config/environment were never supplied.","commonSituations":"Private registry pushes without --creds or docker-creds; CI secrets not injected; typo in credential flag names; empty env vars in containerized runs.","solutions":["Set the credentials via the creds account/secret flags or params","Enable UseDockerCreds to reuse the local Docker config credentials","Ensure environment variables or CI secrets (REGISTRY_USER/REGISTRY_PASSWORD style) are actually set and non-empty","Verify you are targeting a registry that doesn't require auth if pushing anonymously"],"exampleFix":"// before\nCredsAccount: \"\", CredsSecret: \"\", UseDockerCreds: false\n// after\nCredsAccount: \"myuser\", CredsSecret: os.Getenv(\"REGISTRY_PASSWORD\")","handlingStrategy":"validation","validationCode":"if !UseDockerCreds && (CredsAccount == \"\" || CredsSecret == \"\") {\n    return errors.New(\"provide creds or enable UseDockerCreds\")\n}","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Inject registry credentials via environment variables in CI","Enable UseDockerCreds when a logged-in local Docker config exists","Check that secrets are non-empty after expansion before running the command"],"tags":["auth","credentials","validation"],"backgroundTag":"missing-registry-credentials","analyzedSha":"81940d17fa112cc678e32209214bcb2355cb3004","analyzedAt":"2026-08-31T23:06:12.682Z","contentChangedAt":null,"schemaVersion":2},"datasetVersion":"2026-09-08T05:18:18.240Z"}