Edit icon Edit This Page

Download go artifacts

Download a module version from a Go proxy (GOPROXY) repository. Without –version rp finds the latest version the way the go command does: it reads <repo>/<module>/@v/list (the highest release, else the highest tagged pre-release, else the highest pseudo-version) and, when that list is empty, <repo>/<module>/@latest. Then it downloads the three files of the version, each with a request of its own: .info, .mod and .zip. Upper case letters of the module path are escaped as the proxy protocol says (BurntSushi becomes !burnt!sushi in the URL).

The files are stored as <module path with / as _>-<version>.info, .mod and .zip (a long path is cut from the left). The proxy publishes no checksum (there is no checksum database), so none of them can be verified against a digest; rp checks instead that the .info names the requested version, that the .mod declares the module path, and that the .zip is a zip whose entries all lie under <module>@<version>/, and reports the files as not verified. Nothing is stored unless all three pass.

rp download go <module-path> [flags]

Options

      --dir string       Directory to store the file in (created when missing) (default ".")
      --force            Replace the file when it already exists
      --repo string      Repository to download from (required)
      --version string   Version to download (default: the newest the format knows)

Options inherited from parent commands

      --api-url string           Panel API URL of the profile, overrides the stored value
      --ca-file string           PEM file with extra trusted CA certificates
      --debug                    Print debug output with secrets redacted
      --hostname string          Repsy host to use instead of the current profile
      --insecure                 Do not verify TLS certificates (unsafe; plain http is chosen with the URL, not with this flag)
      --insecure-storage         Keep credentials in a plain 0600 file instead of the OS keyring (unsafe; a warning is printed once per command)
      --jq string                Filter JSON output with a jq expression (implies --output json)
      --no-color                 Disable colored output
      --no-input                 Never prompt; fail when input is needed
      --output table|json|yaml   Output format: table, json or yaml (default table; json when --jq is given)
      --owner string             Owner segment of Cloud protocol URLs; --owner= means none
      --registry-url string      Protocol host URL of the profile, overrides the stored value
      --type os|cloud            Product of the host, overrides detection
      --web-url string           Panel UI URL of the profile (where /cli/auth lives), overrides the stored value
      --yes                      Answer yes to confirmation prompts

See also

Found a problem with this page?