GoogleContainerTools/skaffold · error
invalid image %q: no tag should be specified. Use taggers in
Error message
invalid image %q: no tag should be specified. Use taggers instead: https://skaffold.dev/docs/how-tos/taggers/
What it means
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.
Source
Thrown at pkg/skaffold/schema/validation/validation.go:190
Location: prevLines,
})
continue
}
seen[a.ImageName] = c.SourceFile
arMap[a.ImageName] = a
parsed, err := docker.ParseReference(a.ImageName)
if err != nil {
errs = append(errs, wrapWithContext(c, ErrorWithLocation{
Error: fmt.Errorf("invalid image %q: %w", a.ImageName, err),
Location: curLines,
})...)
continue
}
if parsed.Tag != "" {
errs = append(errs, wrapWithContext(c, ErrorWithLocation{
Error: fmt.Errorf("invalid image %q: no tag should be specified. Use taggers instead: https://skaffold.dev/docs/how-tos/taggers/", a.ImageName),
Location: curLines,
})...)
}
if parsed.Digest != "" {
errs = append(errs, wrapWithContext(c, ErrorWithLocation{
Error: fmt.Errorf("invalid image %q: no digest should be specified. Use taggers instead: https://skaffold.dev/docs/how-tos/taggers/", a.ImageName),
Location: curLines,
})...)
}
}
}
return errs
}
func validateArtifactDependencies(configs parser.SkaffoldConfigSet) (cfgErrs []ErrorWithLocation) {
var artifacts []*latest.Artifact
for _, c := range configs {View on GitHub (pinned to a1189de023)
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
Example fix
// before
build:
artifacts:
- image: gcr.io/my-project/app:v1
// after
build:
artifacts:
- image: gcr.io/my-project/app
tagPolicy:
gitCommit: {} Defensive patterns
Strategy: validation
Validate before calling
// Go: reject hard-coded tags in artifact image names
func hasTag(name string) (bool, error) {
ref, err := docker.ParseReference(name)
if err != nil {
return false, err
}
return ref.Tag != "", nil
} Try / catch
if tagged, _ := hasTag(img); tagged {
return errors.New("remove the tag from imageName; configure a tagPolicy instead")
} Prevention
- 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
When it happens
Trigger: skaffold.yaml has build.artifacts[].image.name like 'gcr.io/proj/app:v1' — docker.ParseReference succeeds but parsed.Tag is non-empty.
Common situations: Copying a fully-qualified image reference (including :latest or :v1.2) from a Dockerfile or registry into the skaffold.yaml image field.
Related errors
- verify command expects non-zero number of test cases
- CONFIG_MISSING_MANIFEST_FILE_ERR
- INIT_CLOUD_RUN_LOCATION_ERROR
- missing apiVersion
- custom tag not provided
AI-assisted analysis of GoogleContainerTools/skaffold@a1189de023 (2026-09-05).
Data as JSON: /api/errors/9d5a735447187074.
Report an issue: GitHub.