Skip to content
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: GONOPROXY is undocumented #32056

Closed
bcmills opened this issue May 15, 2019 · 10 comments
Closed

cmd/go: GONOPROXY is undocumented #32056

bcmills opened this issue May 15, 2019 · 10 comments

Comments

@bcmills
Copy link
Member

@bcmills bcmills commented May 15, 2019

GOSUMDB, GONOSUMDB, and GONOPROXY variables were added in CL 173951.

Documentation for GOSUMDB and GONOSUMDB was added to https://tip.golang.org/cmd/go/#hdr-Module_authentication_failures, but I don't see any mention of GONOPROXY in the cmd/go docs at all.

CC @jayconrod @rsc

@bcmills

This comment has been minimized.

Copy link
Member Author

@bcmills bcmills commented May 15, 2019

Some specific questions:

  • Should GOPROXY=off with GONOPROXY=*/x disable all fetches, or allow (only) */x to be fetched directly?
  • What should happen if GOPROXY includes off explicitly in the fallback chain, such as GOPROXY=https://my.proxy,https://other.proxy,off? (In that case, should fetches of the GONOPROXY paths be disabled?)
@ianlancetaylor

This comment has been minimized.

Copy link
Contributor

@ianlancetaylor ianlancetaylor commented May 15, 2019

Also note that all environment variables should be documented at https://golang.org/cmd/go/#hdr-Environment_variables. These new variables are not mentioned there.

@bcmills

This comment has been minimized.

Copy link
Member Author

@bcmills bcmills commented May 15, 2019

One more question to document:

  • If GOPROXY does not include direct as a fallback, should GONOPROXY fall back to direct implicitly, or behave as if GOPROXY were set to off for that module?
@rogpeppe

This comment has been minimized.

Copy link
Contributor

@rogpeppe rogpeppe commented May 16, 2019

I find it a bit odd that GONOPROXY is using sh-style globs anyway, given that GONOPROXY holds a set of package paths (AIUI) not URLs, and package paths are almost always matched with patterns as documented in go help packages.

That is, I'd expect:

GONOPROXY=myorg.com/...

to avoid the proxy for all modules under myorg.com.

@rsc

This comment has been minimized.

Copy link
Contributor

@rsc rsc commented May 16, 2019

If GOPROXY=off and GONOPROXY=* (say), then I think GONOPROXY wins. No matter what GOPROXY is set to, GONOPROXY matching the module means don't pay attention to that.

@rsc

This comment has been minimized.

Copy link
Contributor

@rsc rsc commented May 16, 2019

@rogpeppe, I see your point but I was trying to line up a bit with the standard NO_PROXY (for example https://www.gnu.org/software/emacs/manual/html_node/url/Proxies.html). Also I think it would be just too hard to write something like GONOPROXY=*.corp.yourcompany.com using ... (its not actually possible at all).

@rogpeppe

This comment has been minimized.

Copy link
Contributor

@rogpeppe rogpeppe commented May 17, 2019

I guess I don't understand the GONOPROXY semantics (the whole point of this thread, and probably why I can't get it to work for me); how is GONOPROXY=*.corp.yourcompany.com different from GONOPROXY=....corp.yourcompany.com ?

@bcmills

This comment has been minimized.

Copy link
Member Author

@bcmills bcmills commented May 20, 2019

how is GONOPROXY=*.corp.yourcompany.com different from GONOPROXY=....corp.yourcompany.com ?

The have different behavior for packages such as contrived.example.com/not.your.corp.yourcompany.com.

@gopherbot

This comment has been minimized.

Copy link

@gopherbot gopherbot commented May 21, 2019

Change https://golang.org/cl/178179 mentions this issue: cmd/go: default to GOPROXY=https://proxy.golang.org and GOSUMDB=sum.golang.org

@gopherbot

This comment has been minimized.

Copy link

@gopherbot gopherbot commented May 28, 2019

Change https://golang.org/cl/179219 mentions this issue: cmd/go: document GO{NO}SUMDB in 'go help environment' and 'go help modules'

gopherbot pushed a commit that referenced this issue Jun 4, 2019
…dules'

GOSUMDB and GONOSUMDB are described in detail by
'go help module-auth'. So, this change mentions the two
variables and says to see 'go help module-auth'.

This also adds GONOPROXY to 'go help environment'.

Fixes #32292 and updates #32056.

Change-Id: I2eae0f906a3fbfcb88ad5c8fb4870917d0d7bbcd
Reviewed-on: https://go-review.googlesource.com/c/go/+/179219
Reviewed-by: Russ Cox <rsc@golang.org>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
5 participants
You can’t perform that action at this time.