Resolve Go Modules

JFrog Artifactory Documentation

Products
JFrog Artifactory
Content Type
User Guide
ft:sourceType
Paligo

Resolving Go Only Via Local or Virtual Repositories

Artifactory only supports resolution of Go packages from virtual Go repositories. To resolve Go from other local or remote Go repositories, you need to aggregate them in a virtual Go repository.

To resolve a Go module from your Go repository using Go client:

  1. Set your default Artifactory Go repository by running the following command:

    export GOPROXY="https://pm-admin:<TOKEN>@<your_jfrog_domain>/artifactory/api/go/<your_go_repo>"

    In the command above, replace the following placeholders as follows:

    • <TOKEN> : Replace with your identity token.

    • <your_jfrog_domain>: Replace with the name of your Artifactory domain.

    • <your_go_repo>: Replace with the name of your Go repository.

  2. From your project’s root directory, run:

    go build