Repsy acts as a Go Module Proxy and implements the standard GOPROXY protocol. To install modules from your Repsy registry, point the GOPROXY environment variable to your registry URL.
Authentication
When you create a registry, it will be private by default. Go uses the .netrc file for authenticating to module proxies. Add an entry for repo.repsy.io to your ~/.netrc file:
machine repo.repsy.io
login <username>
password <password>
Make sure the file has restricted permissions:
chmod 600 ~/.netrc
Alternatively, you can embed credentials directly in the GOPROXY URL, though this is not recommended for production environments:
GOPROXY=https://<username>:<password>@repo.repsy.io/<username>/<registryName>
Note: Authentication is only required for private registries. If your registry is public, you can skip .netrc configuration and omit credentials from the GOPROXY URL.
Configure GOPROXY
Set the GOPROXY environment variable to point to your Repsy registry:
export GOPROXY=https://repo.repsy.io/<username>/<registryName>,off
Use ,off to fail loudly if the module is not found in your registry. Use ,direct instead if you also want to fall back to fetching public modules directly from their source.
To make this permanent, add the export to your shell profile (e.g. ~/.bashrc or ~/.zshrc), or configure it per-project using a .env file or your CI/CD environment.
Configure GONOSUMDB
Since Repsy does not act as a checksum database, Go will attempt to verify private modules against the public sum.golang.org. For private module paths, disable sum database verification using GONOSUMDB:
export GONOSUMDB=<your-module-prefix>
Replace <your-module-prefix> with the domain or path prefix you used in go mod init (e.g. example.com, github.com/yourorg).
Install a module
Once GOPROXY and authentication are configured, use go get to install your module:
go get <your-module-path>@v1.0.0
To install the latest available version:
go get <your-module-path>@latest
That’s all! If you have completed all required steps as described, the Go toolchain will download your module from your Repsy registry and add it to your project’s go.mod and go.sum files.