GoogleContainerTools/skaffold · error

generating checksum as fall-back tag for %q: %w

Error message

generating checksum as fall-back tag for %q: %w

What it means

Skaffold's ImageTags function resolves image tags via the configured tagger. When the primary tagger fails (its error is only logged at debug level), it retries with a ChecksumTagger that derives a tag from the build artifact's checksum. If even that fallback tag generation fails, this wrapped error is returned naming the image.

Source

Thrown at pkg/skaffold/deploy/util/util.go:250

	showWarning := false

	for i, artifact := range artifacts {
		imageName := artifact.ImageName
		out, ctx := output.WithEventContext(ctx, out, constants.Build, imageName)
		output.Default.Fprintf(out, " - %s -> ", imageName)

		select {
		case <-ctx.Done():
			return nil, context.Canceled

		case t := <-tagErrs[i]:
			if t.err != nil {
				log.Entry(ctx).Debug(t.err)
				log.Entry(ctx).Debug("Using a fall-back tagger")

				fallbackTag, err := tag.GenerateFullyQualifiedImageName(ctx, &tag.ChecksumTagger{}, *artifact)
				if err != nil {
					return nil, fmt.Errorf("generating checksum as fall-back tag for %q: %w", imageName, err)
				}

				t.tag = fallbackTag
				showWarning = true
			}

			_tag, err := ApplyDefaultRepo(runCtx.GlobalConfig(), runCtx.DefaultRepo(), t.tag)

			if err != nil {
				return nil, err
			}

			fmt.Fprintln(out, _tag)
			imageTags[imageName] = _tag
		}
	}

	if showWarning {

View on GitHub (pinned to a1189de023)

Solutions

  1. Check the debug log output (-vdebug) to see the original tagger error and the fallback failure cause
  2. Verify each artifact's workspace directory exists and contains the expected source files
  3. If the tagger is git-based, run from inside a valid git repository or switch to a checksum/date tagger in skaffold.yaml
  4. Run skaffold build first so tags can be resolved from a real build

Example fix

// before: running deploy in a moved workspace
skaffold deploy -vdebug
// error: generating checksum as fall-back tag for "img": ...
// after: ensure the workspace exists before deploying
cd /path/to/project && skaffold deploy
Defensive patterns

Strategy: fallback

Validate before calling

if _, err := os.Stat(artifact.Workspace); err != nil {
	return fmt.Errorf("workspace missing, checksum fallback tag will fail: %w", err)
}

Try / catch

tags, err := ImageTags(ctx, runCtx, artifacts, tagger, out)
if err != nil && strings.Contains(err.Error(), "generating checksum as fall-back tag") {
	log.Warnf("tagger and checksum fallback failed: %v", err)
}

Prevention

When it happens

Trigger: Calling deploy tag resolution (ImageTags) where the configured tagger fails (e.g. git tagger in a non-git directory, env template tagger missing vars, date tagger failure) AND tag.GenerateFullyQualifiedImageName with ChecksumTagger also fails because the artifact workspace is missing or its template expansion fails.

Common situations: Running skaffold deploy/render without a prior build in a workspace that was moved or deleted; a git-based tagger outside a git repo combined with a broken/empty artifact workspace; malformed image name templates in skaffold.yaml.

Related errors


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