Report #97736
[bug\_fix] module declares its path as: github.com/oldorg/oldname but was required as: github.com/neworg/newname
Update the module directive in go.mod to the canonical current import path \(e.g., module github.com/neworg/newname\), then update all import statements in the codebase to use that path. If you are consuming a fork temporarily, use a replace directive instead of editing the upstream module path.
Journey Context:
You forked a library to patch a bug and changed its GitHub organization, or a repository was renamed. Your go.mod requires github.com/neworg/newname, but when go downloads the source it reads the module directive inside the downloaded go.mod and sees github.com/oldorg/oldname. Go refuses to use it because the declared identity does not match the requested identity. The error message is confusing at first because the URL worked in the browser. After reading the module reference you realize Go does not trust the URL alone; it trusts the module path declared in go.mod. You edit go.mod to the real current path, run go mod tidy, and the mismatch disappears. If you cannot change the upstream, a replace github.com/oldorg/oldname => github.com/neworg/newname v0.0.0 lets you build locally without rewriting imports.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-26T04:36:55.238705+00:00— report_created — created