{"record":{"id":"9d5a735447187074","repo":"GoogleContainerTools/skaffold","slug":"invalid-image-q-no-tag-should-be-specified-use","errorCode":null,"errorMessage":"invalid image %q: no tag should be specified. Use taggers instead: https://skaffold.dev/docs/how-tos/taggers/","messagePattern":"invalid image %q: no tag should be specified\\. Use taggers instead: https://skaffold\\.dev/docs/how-tos/taggers/","errorType":"validation","errorClass":null,"httpStatus":null,"severity":"error","filePath":"pkg/skaffold/schema/validation/validation.go","lineNumber":190,"sourceCode":"\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}\n\t\t}\n\t}\n\treturn errs\n}\n\nfunc validateArtifactDependencies(configs parser.SkaffoldConfigSet) (cfgErrs []ErrorWithLocation) {\n\tvar artifacts []*latest.Artifact\n\tfor _, c := range configs {","sourceCodeStart":172,"sourceCodeEnd":208,"githubUrl":"https://github.com/GoogleContainerTools/skaffold/blob/a1189de023efc32d4b8e11f395acc678aa555011/pkg/skaffold/schema/validation/validation.go#L172-L208","documentation":"validateImageNames rejects artifact image names that contain an explicit tag. Skaffold requires tags to be generated by taggers (e.g. gitCommit, sha256, envTemplate) so each build produces a unique, traceable tag; a hard-coded tag in the config breaks that contract.","triggerScenarios":"skaffold.yaml has build.artifacts[].image.name like 'gcr.io/proj/app:v1' — docker.ParseReference succeeds but parsed.Tag is non-empty.","commonSituations":"Copying a fully-qualified image reference (including :latest or :v1.2) from a Dockerfile or registry into the skaffold.yaml image field.","solutions":["Remove the tag from the image name in skaffold.yaml, keeping only the repository part","Configure build.taggers (e.g. gitCommit, sha256, or envTemplate) so Skaffold assigns tags at build time","If you truly need a fixed tag, use render/deploy overrides instead of the artifact image name"],"exampleFix":"// before\nbuild:\n  artifacts:\n    - image: gcr.io/my-project/app:v1\n// after\nbuild:\n  artifacts:\n    - image: gcr.io/my-project/app\n  tagPolicy:\n    gitCommit: {}","handlingStrategy":"validation","validationCode":"// Go: reject hard-coded tags in artifact image names\nfunc hasTag(name string) (bool, error) {\n\tref, err := docker.ParseReference(name)\n\tif err != nil {\n\t\treturn false, err\n\t}\n\treturn ref.Tag != \"\", nil\n}","typeGuard":null,"tryCatchPattern":"if tagged, _ := hasTag(img); tagged {\n\treturn errors.New(\"remove the tag from imageName; configure a tagPolicy instead\")\n}","preventionTips":["Always write artifact image names without :tag and let tagPolicy (gitCommit, sha256) tag builds","Add a config-lint rule in CI that flags ':' followed by a tag in the image field","Educate the team that tags come from taggers, not the config"],"tags":["skaffold","config-validation","image-tag","taggers"],"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"}