-
Notifications
You must be signed in to change notification settings - Fork 367
Open
Description
It is clear that goproxy can be used for private repositories, but it is unclear how to correctly set this up. I have put goproxy on a computer with full ssh access (and populated GOPATH). I am able to use this to pull code from a machine without private repo access, but there's some caveats with it.
The client computer didn't appear to use the proxy if it could call git directly. So I removed ssh credentials to prevent this path. If I don't specify --insecure, then go get fails on sumdb checks.
This does not work, fails on sumdb
GONOPROXY=github.com/myorg GONOSUMDB=github.com/myorg go run *.go -listen=0.0.0.0:8082 -exclude "github.com/myorg" -proxy http://nope.nope
-> % GOPROXY=http://192.127.1.25:8082 go get -d -v github.com/myorg/[email protected]
github.com/myorg/[email protected]: verifying module: github.com/myorg/[email protected]: reading http://192.127.1.25:8082/sumdb/sum.golang.org/lookup/github.com/myorg/[email protected]: 410 Gone
server response: not found: github.com/myorg/[email protected]: invalid version: unknown revision v1.6.4
Disabling sumdb checks makes it work
GOPROXY=http://192.127.1.25:8082 go get --insecure -d -v github.com/myorg/[email protected]
go get: -insecure flag is deprecated; see 'go help get' for details
go: downloading github.com/myorg/myrepo v1.6.4
oiooj and ArnoSen
Metadata
Metadata
Assignees
Labels
No labels