cmd/go/internal/modcmd: go.work local module fetching from remote by mistake #71055
Labels
GoCommand
cmd/go
NeedsInvestigation
Someone must examine and confirm this is a valid issue and not a duplicate of an existing one.
WaitingForInfo
Issue is not actionable because of missing required information, which needs to be provided.
Milestone
Go version
go version go1.21.1 darwin/arm64
Output of
go env
in your module/workspace:What did you do?
I have a repo which module name is
github.com/violapioggia/fake_module
and it is used by my main repo by go.work, it can import and work successfully but when I use commandgo mod tidy
, it tried to get the module from remote and return error even if I had already have this module locally by go.work.What did you see happen?
go mod tidy
go: finding module for package github.com/violapioggia/fake_module/test
go: rgo_test imports
github.com/violapioggia/fake_module/test: cannot find module providing package github.com/violapioggia/fake_module/test: module github.com/violapioggia/fake_module/test: git ls-remote -q origin in /Users/violapioggia/go/pkg/mod/cache/vcs/1947ab1c5f53e39b9356cdc44ed18f4f16ffcc10b0bedf604238c177732107de: exit status 128:
remote: Repository not found.
fatal: repository 'https://github.com/violapioggia/fake_module/' not found
What did you expect to see?
I want to use
go mod tidy
to not to get remote module when I already have this module in go.work.The text was updated successfully, but these errors were encountered: