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

x/pkgsite/cmd/pkgsite: local pkgsite with -proxy doesn't use netrc auth to private GOPROXY #60299

Open
dnwe opened this issue May 19, 2023 · 0 comments

Comments

@dnwe
Copy link

dnwe commented May 19, 2023

What did you do?

Attempted to use a .netrc file to provide credentials to pkgsite for use when fetching via a private GOPROXY.

The regular go mod commands are able to do this, so with a properly configured .netrc file the following succeeds:

GOPROXY="https://goproxy.company.com" go mod download -x github.company.com/org/repo@latest

But attempting to view the documentation of github.company.com/org/repo via pkgsite:

GOPROXY="https://goproxy.company.com" pkgsite -proxy

Fails with 401 authentication errors as the internal/proxy/client.go code doesn't attempt to insert authentication headers, unlike cmd/go which does

What did you expect to see?

pkgsite should be able to use authentication against a private GOPROXY

What did you see instead?

pkgsite does not pass authentication headers to the http requests it makes to a private GOPROXY

@dnwe dnwe added the pkgsite label May 19, 2023
@gopherbot gopherbot added this to the Unreleased milestone May 19, 2023
@suzmue suzmue modified the milestones: Unreleased, pkgsite/later May 22, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants