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
- Treat it seriously first: verify network path (DNS, proxy, TLS) is not intercepting github.com traffic
- Update restic via a trusted channel (package manager, or manual download from the official releases page verified with the published fingerprints)
- If caused by signing-key rotation, upgrade via distro package or build from signed source until the trusted key set catches up
- Do not bypass or ignore the failure; report persistent verified-mismatch to the restic maintainers
Defensive patterns
Strategy: fallback
Prevention
- Never bypass GPG verification failures; treat them as possible tampering
- Update via package manager or manually verified downloads when self-update fails
- Keep track of restic's release-signing key rotations via official announcements
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
- node has invalid path
- ZIP archive contains more than one file
- tag name for latest release is empty
- reading keyring failed: %w
AI-assisted analysis of restic/restic@a80be1478a (2026-08-15).
Data as JSON: /api/errors/c377f9ebb14e964e.
Report an issue: GitHub.