restic/restic · critical

GPG signature verification of the file SHA256SUMS failed

Error message

GPG signature verification of the file SHA256SUMS failed

What it means

During self-update, restic downloads SHA256SUMS and SHA256SUMS.asc and runs GPGVerify on them. If verification executes but yields ok == false, this error is returned: the signature does not match the signed data, or it was not made by a key restic trusts. This is a hard security stop before any binary is installed.

Source

Thrown at internal/selfupdate/download.go:150

	printf("latest version is %v\n", rel.Version)

	_, sha256sums, err := getGithubDataFile(ctx, rel.Assets, "SHA256SUMS", printf)
	if err != nil {
		return "", err
	}

	_, sig, err := getGithubDataFile(ctx, rel.Assets, "SHA256SUMS.asc", printf)
	if err != nil {
		return "", err
	}

	ok, err := GPGVerify(sha256sums, sig)
	if err != nil {
		return "", err
	}

	if !ok {
		return "", errors.New("GPG signature verification of the file SHA256SUMS failed")
	}

	printf("GPG signature verification succeeded\n")

	ext := "bz2"
	if runtime.GOOS == "windows" {
		ext = "zip"
	}

	suffix := fmt.Sprintf("%s_%s.%s", runtime.GOOS, runtime.GOARCH, ext)
	downloadFilename, buf, err := getGithubDataFile(ctx, rel.Assets, suffix, printf)
	if err != nil {
		return "", err
	}

	printf("downloaded %v\n", downloadFilename)

	wantHash, err := findHash(sha256sums, downloadFilename)

View on GitHub (pinned to a80be1478a)

Solutions

  1. Treat it seriously first: verify network path (DNS, proxy, TLS) is not intercepting github.com traffic
  2. Update restic via a trusted channel (package manager, or manual download from the official releases page verified with the published fingerprints)
  3. If caused by signing-key rotation, upgrade via distro package or build from signed source until the trusted key set catches up
  4. Do not bypass or ignore the failure; report persistent verified-mismatch to the restic maintainers
Defensive patterns

Strategy: fallback

Prevention

When it happens

Trigger: `restic self-update` where the SHA256SUMS content or its .asc signature was altered in transit (MITM, re-writing proxy), or the signature was produced by an unknown/untrusted key so verification resolves to false.

Common situations: Man-in-the-middle tampering with GitHub asset downloads; mirrors or caches that regenerate assets; local GPG keyring of trusted release keys outdated after a signing-key rotation.

Related errors


AI-assisted analysis of restic/restic@a80be1478a (2026-08-15). Data as JSON: /api/errors/c377f9ebb14e964e. Report an issue: GitHub.