-
Notifications
You must be signed in to change notification settings - Fork 18k
cmd/go: GOPROXY list feature fails to allow private modules to be downloaded #31818
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
The go command failed to retrieve necessary info from the sumdb - sum.golang.org can't see private modules either. Can you try to exclude the private modules from verification using By the way, I think a better approach for accessing private repos is to use the |
@rsc Looks like |
@FiloSottile Yes I believe this is intended for right now in the early phases of testing. GOSUMDB defaults to sum.golang.org if GOPROXY=https://proxy.golang.org in the Go 1.13 dev branch, but GOSUMDB is still off at tip. |
Yes, and not just true and intended but also documented: https://tip.golang.org/cmd/go/#hdr-Module_authentication_failures. |
@amnonbc, you need to set GONOSUMDB to tell the go command which modules not to check (the whole point of the checksum database is to avoid trusting downloads blindly, so this information must originate with you, not some network server that might be intercepted). See the end of https://tip.golang.org/cmd/go/#hdr-Module_authentication_failures, and note that you can set it easily by using the new |
@rsc, should we consider a change in authentication logic if the GOPROXY is a list? E.g. if a module was fetched from 'direct' mode because the first proxy (proxy.golang.org) couldn't serve the module. Or, enable authentication at least for modules downloaded from the proxy.golang.org if GOPROXY=<private_proxy>,https://proxy.golang.org. |
@rsc Thanks for the explanation, and the awesome work on Modules. |
What version of Go are you using (
go version
)?go version devel +004fb5c Fri May 3 03:49:11 2019 +0000 linux/amd64
Does this issue reproduce with the latest release?
NA
What operating system and processor architecture are you using (
go env
)?go env
OutputWhat did you do?
GOPROXY=https://proxy.golang.org/,direct go build
What did you expect to see?
I expect to see private modules downloaded directly from my company's VCS (which is behind a corporate firewall and not accessible from the internet).
(as described in f30c564)
What did you see instead?
when
GOPROXY=direct
, thenmymodule
downloads and builds without problem.The text was updated successfully, but these errors were encountered: