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

  1. Remove the tag from the image name in skaffold.yaml, keeping only the repository part
  2. Configure build.taggers (e.g. gitCommit, sha256, or envTemplate) so Skaffold assigns tags at build time
  3. 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

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


AI-assisted analysis of GoogleContainerTools/skaffold@a1189de023 (2026-09-05). Data as JSON: /api/errors/9d5a735447187074. Report an issue: GitHub.