Skip to main content


Private modules are only accessible to authorized users and cannot be pulled through the default module proxy at or have their checksums verified with the public checksum database at To access private modules you need to specify a combination of GOPROXY, GOPRIVATE, GONOPROXY and/or GONOSUMDB.

There are two possible ways to configure go for private modules:

  • Using This implicitly sets GONOPROXY/GONOSUMDB to the same value, causing go to use the direct strategy for fetching directly from BSR without going through the public proxy.

    NOTE: Due to GONOPROXY including the buf registry, this is not compatible with specifying auth directly in GOPROXY. Only netrc based auth is supported in this configuration.

  • Using GOPROXY=,$GOPROXY and This instructs go to try a module from the buf from buf before falling back to the exisiting configured proxies. This works both for netrc and direct authentication.

Modify the Go environment using the export command in your shell or with the go env -w command to persist the change.


For more information, see the official private modules documentation.