Reputation: 414
I have a private project which uses a private module at github.com/company/company-product
. When I try to build the project, I get:
go: github.com/company/[email protected]: reading github.com/company/company-product/go.mod at revision v1.0.4: unknown revision v1.0.4
Things I have tried:
go env -w GO111MODULE=on
go env -w GOPRIVATE=github.com/company/company-product
export GOPRIVATE=github.com/company/*
export GONOPROXY=github.com/company/*
export GONOSUMDB=github.com/company/*
ssh://[email protected]/
instead of https://github.com/
ssh://[email protected]/
instead of https://github.com/
$GOPATH/pkg
go clean
go mod download
, go mod tidy
, go mod vendor
(which all produce the above error)And yet I still get the same error.
Upvotes: 2
Views: 4661
Reputation: 325
the solution which worked for me;
Upvotes: 0
Reputation: 414
It looks like the key was to do things in a certain order:
github.com/company/*
$GOPATH/pkg
ssh://[email protected]/
instead of https://github.com/
go get github.com/company/company-product
Upvotes: 5