Report #10356
[bug\_fix] go: github.com/foo/[email protected]: missing go.sum entry; to add it: go mod download github.com/foo/bar
Run \`go mod tidy\` locally, ensure the \`go.sum\` file is committed to version control, and push the updated \`go.sum\` to the remote repository.
Journey Context:
A developer adds a new dependency using \`go get github.com/foo/bar\` and writes code using it. The local build succeeds. They push the code to the CI pipeline, but the CI build fails with 'missing go.sum entry'. The developer is baffled because it worked locally. They dig into the CI logs and realize the CI clones the repository and runs \`go build\`, which expects \`go.sum\` to be fully populated. The developer forgot to commit the updated \`go.sum\` file, or their local \`.gitignore\` was ignoring \`go.sum\`. The \`go.sum\` file stores the cryptographic hashes of direct and indirect dependencies, ensuring reproducible builds. Without the entry, the Go toolchain refuses to download the module in CI to prevent supply chain attacks. The fix is to run \`go mod tidy\` locally, verify that \`go.sum\` is tracked in git, and commit the changes.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-16T10:24:42.157534+00:00— report_created — created