]> Cypherpunks repositories - gostls13.git/commit
cmd/go: add GOAUTH mechanism for HTTP authentication
authorSam Thanawalla <samthanawalla@google.com>
Tue, 13 Aug 2024 16:48:11 +0000 (16:48 +0000)
committerSam Thanawalla <samthanawalla@google.com>
Tue, 1 Oct 2024 15:21:38 +0000 (15:21 +0000)
commit8194d735cff90871b1ea5c92e83ddd50abdd4185
tree1abb66e9f1a31a6f69085dc5745c3f3ab7486e1f
parentb2a856e82cf889cdba26476b5d55f8dd340604d0
cmd/go: add GOAUTH mechanism for HTTP authentication

This change adds a new environment variable GOAUTH which takes a semicolon-separated list of commands to run for authentication during go-import resolution and HTTPS module mirror protocol interactions.
This CL only supports netrc and off. Future CLs to follow will extend support to git and a custom authenticator command.

For #26232

Cq-Include-Trybots: luci.golang.try:gotip-linux-amd64-longtest,gotip-windows-amd64-longtest
Change-Id: I6cfa4c89fd27a7a4e7d25c8713d191dc82b7e28a
Reviewed-on: https://go-review.googlesource.com/c/go/+/605256
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Reviewed-by: Michael Matloob <matloob@golang.org>
Reviewed-by: Alan Donovan <adonovan@google.com>
src/cmd/go/alldocs.go
src/cmd/go/internal/auth/auth.go
src/cmd/go/internal/auth/auth_test.go [new file with mode: 0644]
src/cmd/go/internal/cfg/cfg.go
src/cmd/go/internal/envcmd/env.go
src/cmd/go/internal/help/helpdoc.go
src/cmd/go/testdata/script/goauth_netrc.txt [new file with mode: 0644]
src/internal/cfg/cfg.go