Go Repositories

Go Repositories

Go modules are the standard dependency mechanism for Go applications. Go utilizes a decentralized dependency model where the source control system (VCS) is often the primary source of truth.

Go utilizes two separate components to mirror module content and checksum data. The go.mod file defines the module identity and direct dependencies. The go.sum file stores cryptographic hashes to ensure module versions remain unchanged. Sonatype Nexus Repository integrates with both the infrastructure components.

Component Public Default Purpose
Module Proxy proxy.golang.org Mirror and serve module source code (.zip, .mod, .info).
Checksum Database sum.golang.org Serve SHA-256 hashes of module proxy content for integrity validation.

Sonatype Nexus Repository supports the Go module proxy protocol so you can centralize access to public modules, host internal modules, and expose a single endpoint for Go dependency resolution.

Go repositories are available in both Pro and Community Edition. Nexus supports authenticated access and can also be used with anonymous access when enabled. See the Go Modules Reference for background on the Go module ecosystem.

Getting Started with Go in Nexus

Explore the following topics to know how to configure and use Go with Nexus.

  1. Nexus for Go
  2. Create a Go Repository
  3. Configure Go with Nexus
  4. Go CLI Usage

Nexus for Go