{"record":{"id":"703d170776b65ed0","repo":"GoogleContainerTools/skaffold","slug":"invalid-image-q-w","errorCode":null,"errorMessage":"invalid image %q: %w","messagePattern":"invalid image %q: %w","errorType":"validation","errorClass":null,"httpStatus":null,"severity":"error","filePath":"pkg/skaffold/schema/validation/validation.go","lineNumber":182,"sourceCode":"\t\t\t\terrs = append(errs, ErrorWithLocation{\n\t\t\t\t\tError: fmt.Errorf(\"duplicate image %q found in sources %s and %s: artifact image names must be unique across all configurations\",\n\t\t\t\t\t\ta.ImageName, prevSource, c.SourceFile),\n\t\t\t\t\tLocation: curLines,\n\t\t\t\t})\n\t\t\t\terrs = append(errs, ErrorWithLocation{\n\t\t\t\t\tError: fmt.Errorf(\"duplicate image %q found in sources %s and %s: artifact image names must be unique across all configurations\",\n\t\t\t\t\t\ta.ImageName, prevSource, c.SourceFile),\n\t\t\t\t\tLocation: prevLines,\n\t\t\t\t})\n\t\t\t\tcontinue\n\t\t\t}\n\n\t\t\tseen[a.ImageName] = c.SourceFile\n\t\t\tarMap[a.ImageName] = a\n\t\t\tparsed, err := docker.ParseReference(a.ImageName)\n\t\t\tif err != nil {\n\t\t\t\terrs = append(errs, wrapWithContext(c, ErrorWithLocation{\n\t\t\t\t\tError:    fmt.Errorf(\"invalid image %q: %w\", a.ImageName, err),\n\t\t\t\t\tLocation: curLines,\n\t\t\t\t})...)\n\t\t\t\tcontinue\n\t\t\t}\n\n\t\t\tif parsed.Tag != \"\" {\n\t\t\t\terrs = append(errs, wrapWithContext(c, ErrorWithLocation{\n\t\t\t\t\tError:    fmt.Errorf(\"invalid image %q: no tag should be specified. Use taggers instead: https://skaffold.dev/docs/how-tos/taggers/\", a.ImageName),\n\t\t\t\t\tLocation: curLines,\n\t\t\t\t})...)\n\t\t\t}\n\n\t\t\tif parsed.Digest != \"\" {\n\t\t\t\terrs = append(errs, wrapWithContext(c, ErrorWithLocation{\n\t\t\t\t\tError:    fmt.Errorf(\"invalid image %q: no digest should be specified. Use taggers instead: https://skaffold.dev/docs/how-tos/taggers/\", a.ImageName),\n\t\t\t\t\tLocation: curLines,\n\t\t\t\t})...)\n\t\t\t}","sourceCodeStart":164,"sourceCodeEnd":200,"githubUrl":"https://github.com/GoogleContainerTools/skaffold/blob/a1189de023efc32d4b8e11f395acc678aa555011/pkg/skaffold/schema/validation/validation.go#L164-L200","documentation":"Skaffold's config validation (validateImageNames) parses every build artifact's imageName with docker.ParseReference and rejects names that are not valid Docker image references. The wrapped inner error from the Docker reference parser explains exactly which part of the name is malformed. It is thrown at config load time so bad image names fail fast before any build runs.","triggerScenarios":"A skaffold.yaml artifact has build.artifacts[].image.name that fails docker reference parsing: empty name, illegal characters, wrong registry/port syntax, or more than one tag/colon segment.","commonSituations":"Typo in the image name (e.g. 'my app/api'), stray quotes or whitespace, using 'localhost:5000:5000/repo' style port confusion, or templated names left unresolved ({{.Var}} not substituted).","solutions":["Read the wrapped inner error to see which character or segment is invalid, then correct the image name in skaffold.yaml","Use the standard [registry/]repository[:tag] format, e.g. 'gcr.io/project/name' (tag will be added by taggers)","Check that environment/templated values used in the name are defined and expanded correctly","Validate the name locally with 'docker tag' or docker's reference parser before committing"],"exampleFix":"// before\nbuild:\n  artifacts:\n    - image: \"my app/api\"\n// after\nbuild:\n  artifacts:\n    - image: \"gcr.io/my-project/my-app\"","handlingStrategy":"validation","validationCode":"// Go: validate an image reference before putting it in skaffold config\nfunc isValidImageRef(name string) error {\n\t_, err := docker.ParseReference(name)\n\treturn err\n}","typeGuard":null,"tryCatchPattern":"if err := isValidImageRef(img); err != nil {\n\treturn fmt.Errorf(\"fix image name %q before running skaffold: %w\", img, err)\n}","preventionTips":["Keep image names in the registry/repository[:tag] format with no spaces or stray quotes","Run 'skaffold config' or 'skaffold diagnose' in CI to catch malformed names early","Ensure templated name parts are defined before expansion"],"tags":["skaffold","docker","config-validation","image-name"],"backgroundTag":"invalid-image-reference","analyzedSha":"a1189de023efc32d4b8e11f395acc678aa555011","analyzedAt":"2026-09-05T12:09:27.064Z","contentChangedAt":"2026-09-05T12:09:27.064Z","schemaVersion":2},"datasetVersion":"2026-09-12T17:17:11.597Z"}