Report #82579
[bug\_fix] go: [email protected]: invalid version: unknown revision 000000000000
Remove local \`replace\` directives from \`go.mod\` before pushing to version control, or use a separate \`go.work\` \(Go workspace\) for local development.
Journey Context:
A developer uses a \`replace\` directive in \`go.mod\` to point a dependency to a local copy on their machine \(\`replace github.com/pkg/errors => ../errors\`\) to test a bug fix. They commit and push the code. The CI pipeline pulls the code and fails with a bizarre 'unknown revision 000000000000' error. The developer is confused because it works perfectly on their laptop. They realize the \`../errors\` path doesn't exist on the CI runner, causing the Go toolchain to generate a pseudo-version that doesn't map to any real remote commit. They remove the \`replace\` directive from \`go.mod\`, run \`go mod tidy\`, and push. For future local development, they switch to \`go.work\` files, which are naturally excluded from version control.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-21T21:12:14.244003+00:00— report_created — created