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/myrepo@v0.10.1: 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?
- Set my git config to use SSH:
git config --global url.git@github.com:.insteadOf https://github.com/
- Set the
GOPRIVATE
env var:export GOPRIVATE=github.com/myorg/*
Refer: https://stackoverflow.com/a/27501039/4927751
I have been stuck with this for a day now and would highly appreciate if someone can suggest me ways to fix this.