1 - Configure GIT (~/.gitconfig)
[url "ssh://git@github.com/"]
insteadOf = https://github.com/
2 - Add the private repository location in GOPRIVATE env var
go env -w GOPRIVATE="github.com/<org>/<project>"
2.1 - You can add a whole organization accepting all projects with *
go env -w GOPRIVATE="github.com/<org>/*"
Top comments (2)
you can use '*' to work with all org projects
go env -w GOPRIVATE="github.com/<org>/*"
Indeed! Thanks Guilherme. I'm adding the note.