I have a private Go repo at https://github.com/myorg/myrepo that is used by another Go repo and defined in go.mod.
When I try to run $ go mod tidy to download all the dependencies, it returns me the following error:
go: github.com/myorg/[email protected]: reading github.com/myorg/myrepo/go.mod at revision v0.10.1: unknown revision v0.10.1
The same thing happens when I try to "go get" this module.
What have I tried so far?
git config --global [email protected]:.insteadOf https://github.com/GOPRIVATE env var: export GOPRIVATE=github.com/myorg/*
Refer: https://stackoverflow.com/a/27501039/4927751I have been stuck with this for a day now and would highly appreciate if someone can suggest me ways to fix this.
Finally resolved this thanks to a colleague.
Issue: Local module caching in Go - not sure how its managed internally by the go tool.
Solution:
($GOPATH)/pkg/mod/cache repo.If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With