kopia/kopia · error
unable to download releases checksum
Error message
unable to download releases checksum
What it means
verifyGitHubReleaseIsComplete downloads the release's checksums.txt.sig file to confirm the release is fully published. This error wraps http.NewRequestWithContext failures when constructing the GET for https://github.com/<repo>/releases/download/<release>/checksums.txt.sig. Like line 112, this is nearly always an invalid URL, e.g. when releaseName is empty or contains characters that break URL parsing.
Solutions
- Verify releaseName is a valid tag name (non-empty, URL-safe); re-encode if it contains special characters.
- Ensure repo.BuildGitHubRepo is set correctly at build time via ldflags.
- Check the wrapped cause with errors.Cause to confirm it is a url.Parse error.
Defensive patterns
Strategy: validation
Validate before calling
if releaseName == "" || strings.ContainsAny(releaseName, " \t\n") {
// invalid release name would break the checksum URL; skip verification
} Try / catch
if err := verifyGitHubReleaseIsComplete(ctx, rel); err != nil {
return errors.Wrap(err, "unable to validate GitHub release")
} Prevention
- Ensure release names come straight from the GitHub API name field (valid tag names).
- Set repo.BuildGitHubRepo correctly at build time.
- Treat this as a guard against incomplete releases — failure means the release is not ready, not a local fault.
When it happens
Trigger: http.NewRequestWithContext fails building the checksum download request — malformed URL from fmt.Sprintf(checksumsURLFormat, repo.BuildGitHubRepo, releaseName), typically an empty repo name or an invalid/empty releaseName.
Common situations: A custom build with empty repo.BuildGitHubRepo; a release whose name contains spaces or characters needing percent-encoding; calling the API with a releaseName that came back empty from a nameless GitHub release object.
Understand the failure class
Background: "Invalid URL" / "URL cannot be empty": fix the malformed or missing URL behind request-construction failures — this error's family across 50 libraries.
Related errors
- unable to get latest release from github
- invalid GitHub API response
- invalid status code from GitHub
- unable to create request
- update to get the latest release from GitHub
AI-assisted analysis of kopia/kopia@82495e54b5 (2026-09-07).
Data as JSON: /api/errors/89f19c63e18bd202.
Report an issue: GitHub.
Appendix: source
Thrown at cli/update_check.go:143
var responseObject struct {
Name string `json:"name"`
}
if err := json.NewDecoder(resp.Body).Decode(&responseObject); err != nil {
return "", errors.Wrap(err, "invalid GitHub API response")
}
return responseObject.Name, nil
}
// verifyGitHubReleaseIsComplete downloads checksum file to verify that the release is complete.
func verifyGitHubReleaseIsComplete(ctx context.Context, releaseName string) error {
ctx, cancel := context.WithTimeout(ctx, githubTimeout)
defer cancel()
req, err := http.NewRequestWithContext(ctx, http.MethodGet, fmt.Sprintf(checksumsURLFormat, repo.BuildGitHubRepo, releaseName), http.NoBody)
if err != nil {
return errors.Wrap(err, "unable to download releases checksum")
}
resp, err := http.DefaultClient.Do(req)
if err != nil {
return errors.Wrap(err, "unable to download releases checksum")
}
defer resp.Body.Close() //nolint:errcheck
if resp.StatusCode != http.StatusOK {
return errors.Errorf("invalid status code from GitHub: %v", resp.StatusCode)
}
return nil
}
func (c *App) maybeCheckForUpdates(ctx context.Context) (string, error) {
if v := os.Getenv(c.EnvName(checkForUpdatesEnvar)); v != "" {View on GitHub (pinned to 82495e54b5)