Vetrix Docs

Go Module Proxy

Vetrix exposes a GOPROXY-compatible module proxy for each repository.

Proxy URL

https://<vetrix-host>/go/<owner>/<repo>/

Configuration

Set GOPROXY in your environment or go env:

export GOPROXY=https://<vetrix-host>/go/<owner>/<repo>/,direct

For private repositories, supply credentials via netrc or via GONOSUMCHECK and a .netrc entry:

machine <vetrix-host>
  login <username>
  password <jwt-token>

Supported endpoints

Method Path Description
GET /{module}/@v/list List available versions
GET /{module}/@v/{version}.info Version metadata (JSON)
GET /{module}/@v/{version}.mod go.mod file
GET /{module}/@v/{version}.zip Source zip
GET /{module}/@latest Latest version info

Publishing

Upload a module source zip and its go.mod via HTTP PUT:

# Upload source zip
curl -X PUT -H "Authorization: Bearer <token>" \
  --data-binary @module.zip \
  https://<vetrix-host>/go/<owner>/<repo>/<module>/@v/<version>.zip

# Upload go.mod
curl -X PUT -H "Authorization: Bearer <token>" \
  --data-binary @go.mod \
  https://<vetrix-host>/go/<owner>/<repo>/<module>/@v/<version>.mod

Access control

  • Public repositories: unauthenticated reads allowed.
  • Private repositories: credentials required for all operations.
  • Publishing always requires authentication and the caller must be the repository owner.