Xo is experimental. The source code is not public yet; it will be soon. Read the release notes
Menu · XO1302

Docs

XO1302: module version cannot be fetched

error · reported by the modules

A module path is its location: github.com/acme/billing is fetched with git from https://github.com/acme/billing.git (XO_GIT_BASE=<dir or URL> or XO_GIT_REWRITE=<prefix>=<url>,… point it elsewhere, for mirrors and tests), and version v1.4.0 is the tree of the tag v1.4.0, extracted with git archive (no code runs). A module in a subdirectory of its repository (github.com/acme/tools/cli in cli/) is that directory’s tree at the tag cli/v1.4.0. This failed: the repository cannot be reached or cloned, it has no such tag, the tag has no xo.mod in the module’s directory, or that xo.mod declares a different module path. The message carries git’s reason. With XO_PROXY listing module proxies, the message carries each source’s answer: a proxy that does not have the version (404) passes on to the next source after a comma, any error does after a pipe, and off forbids fetching. A zip with paths outside the module, or a tree that contradicts the proxy’s own .lock answer, also fails here. See core 4.2 and decisions 0086 and 0126.

Example

// xo.mod
module example.com/api
require github.com/acme/billing v1.9.9   // no such tag

Fix

// pick an existing tag (xo get github.com/acme/billing takes the latest)
module example.com/api
require github.com/acme/billing v1.4.0

Run xo explain XO1302 for this text in a terminal, or see section 10.6 of the specification.