openSUSE / obs-service-go_modules

OBS Source Service to download, verify, and vendor Go module dependency sources
GNU General Public License v2.0
19 stars 18 forks source link

Allow to use a custom goproxy #39

Open jjacque opened 1 year ago

jjacque commented 1 year ago

One way to allow building vendor archive (or even to download dependencies) when private repos are involved is to use an authenticating proxy (ie: https://github.com/goproxy/goproxy). It uses environment variables to define the proxy address (GOPROXY) and the private repos (GONOSUMDB) (see https://go.dev/ref/mod#private-modules).

It especially useful for private instances owners that want to build using go packages hosted on private repos by setting up the authentication for those repos at the goproxy level.