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
cmd/go: GOPROXY should have an equivalent to NO_PROXY #29397
Comments
This work is needed proxy to do, instead |
There're possible ways:
It seems by way 2 there can be no change with cmd/go, but it would break auth to original private repo. So I prefer way 1 or way 3. |
Dup of #26334? Or is this in the opposite direction (you don't want to ask the proxy for that module even if it can supply it)? |
Sounds like a dup, as you'd be able to do GOPROXY=myproxy,direct |
Yes, |
Closing this issue, feel free to discuss details in the original issue Brian mentioned above. |
What version of Go are you using (
go version
)?What did you do?
I have a GOPROXY set up that will fetch from upstream. This lets me work within an otherwise internal-only corporate LAN. My GOPROXY is a simplified version of the Athens Project. It works quite well for repos from github.com and the like.
However, I would like to include a private repo as a module. The private repo is on the internal LAN. It supports basic auth but is not publicly available. After importing my private repo, I try
go get .
which is equivalent to:Of course it fails authentication.
What did you expect to see?
There should be a mechanism to disable GOPROXY for certain URLs. For example, HTTP_PROXY has NO_PROXY. Maybe we can have a GO_NOPROXY that works the same way. Then I would expect
go get .
to work successfully for both public repos (through the proxy) and private repos (not through the proxy).What did you see instead?
I saw failed authentication with no way to get around it.
I recognize that authentication is a complex subject, because the GOPROXY would have to forward the client credentials and cache the results on a per-user basis. My thought is that authenticated servers should probably be accessed directly and not through a GOPROXY; hence the need for a GO_NOPROXY environment variable.
The text was updated successfully, but these errors were encountered: