Chainguard Libraries for Go overview
Go modules for your application development
For the complete documentation index, see llms.txt.
Go module consumption in a large organization is typically managed by a repository manager. The repository manager acts as a single point of access for developers and development tools to retrieve Go modules.
Configure Artifactory with a single remote repository pointed at https://libraries.cgr.dev/go/. Chainguard Repository handles upstream fallback and policy enforcement; Artifactory handles local caching, access control, and the endpoint used by your Go toolchains.
JFrog Artifactory supports Go repositories for proxying and hosting Go modules, and virtual repositories for combining sources into one endpoint. Refer to the Go repositories documentation for Artifactory for more information.
If an existing Artifactory remote repository points directly to a public Go module proxy, disable or remove it from the virtual repository that your builds use. Artifactory resolves virtual repositories according to their configured order, so a misconfiguration can cause an unprotected module to be served without an obvious build failure.
Before you begin, you need:
Use the following steps to add Chainguard Libraries for Go as an Artifactory remote repository:
go-chainguardhttps://libraries.cgr.dev/go/chainctlchainctlChainguard Libraries serves module metadata and source archives through the standard Go module proxy protocol. Some module files may be served through redirects to pre-signed storage URLs. These settings prevent Artifactory from rewriting the redirect, forwarding credentials to another host, or caching a redirect response instead of the module file.
Create a virtual repository to give developers and CI systems a single Go module endpoint:
go-allgo-chainguardFor the recommended configuration, go-chainguard should be the only external upstream in go-all.
Validate the Artifactory remote before configuring developer workstations or CI/CD systems. The Artifactory Test button is not a reliable indicator of a working Chainguard configuration; a remote can pass the test but still be misconfigured for package retrieval.
Use a module and version that are available through your organization’s Chainguard Libraries for Go entitlement. The following example uses rsc.io/quote version v1.5.2:
Fetch the module archive directly from Chainguard and compute its checksum:
curl -fsS -L \\
-u "${CHAINGUARD_GO_IDENTITY_ID}:${CHAINGUARD_GO_TOKEN}" \\
"https://libraries.cgr.dev/go/rsc.io/quote/@v/v1.5.2.zip" \\
| sha256sumFetch the same archive through the Artifactory remote repository and compute its checksum:
curl -fsS -L \\
-u "${ARTIFACTORY_USERNAME}:${ARTIFACTORY_TOKEN}" \\
"https://<artifactory-host>/artifactory/go-chainguard/rsc.io/quote/@v/v1.5.2.zip" \\
| sha256sumReplace artifactory-host with your Artifactory hostname. Replace ARTIFACTORY_USERNAME and ARTIFACTORY_TOKEN with credentials that can read from Artifactory.
Fetch the archive through the virtual repository that developers and CI systems will use:
curl -fsS -L \\
-u "${ARTIFACTORY_USERNAME}:${ARTIFACTORY_TOKEN}" \\
"https://<artifactory-host>/artifactory/go-all/rsc.io/quote/@v/v1.5.2.zip" \\
| sha256sumThe three checksums must match. Do not proceed to production rollout if the Artifactory checksum differs from the direct Chainguard checksum or if either Artifactory request fails.
If validation fails, review the following settings:
chainctl auth pull-token create --repository=go and update the Artifactory remote repository credentials. Expired tokens can fail without a clear error in the Artifactory user interface.go-chainguard cache and repeat the validation.go-chainguard or is still included in go-all.Use the URL of the go-all virtual repository in Go configuration. In Artifactory, select the go-all repository and use Set Me Up or Generate Settings to obtain the URL and authentication instructions for your Artifactory version. The URL commonly has the following form: https://exampleorg.jfrog.io/artifactory/go-all.
See Configuring your build tool for more information.
Last updated: 2026-09-29 19:14