glab(1)
π NAME π
glab-artifact-registry-get-token β Get a short-lived access token for the GitLab Artifact Registry. (EXPERIMENTAL)
Okay bestie, this is the glab(1) manual page for that exact command, and it is giving experimental β read the fine print, no cap. π§ͺβ¨
π οΈ SYNOPSIS π οΈ
glab artifact-registry get-token [flags]
π DESCRIPTION π
The command exchanges a GitLab credential for a short-lived access token scoped to the GitLab Artifact Registry. The command prints the bare token to stdout, so a shell can capture it directly, for example to feed docker login. π
Prerequisites, bestie β do a vibe check before you run this:
- A GitLab Enterprise Edition (EE) instance on GitLab
19.1or later. - Token exchange enabled on the instance (the
gate_token_exchange_endpointfeature flag).
β οΈ This feature is an experiment and is not ready for production use. It might be unstable or removed at any time. For more information, see https://docs.gitlab.com/policy/development_stages_support/.
β¨ OPTIONS β¨
--duration=15m0sβ How long the token should remain valid. Must be between1sand12h0m0s. β³--hostname=""β GitLab hostname to request the token from. Defaults to the configured GitLab instance. π--jq=""β Filter JSON output with ajqexpression. πͺ-F,--output="text"β Format output as:text,json. π
π«Ά OPTIONS INHERITED FROM PARENT COMMANDS π«Ά
-h,--help[=false]β Show help for this command. π
π EXAMPLE π
# Get a token using the default duration
glab artifact-registry get-token
# Get a token valid for one hour
glab artifact-registry get-token --duration 1h
# Get a token as JSON, including its expiry
glab artifact-registry get-token --output json
π SEE ALSO π
glab-artifact-registry(1)β go peek at the parent page, bestie. π¦
Auto generated by spf13/cobra β Nov 2026 β glab(1) β mwah πβ¨
π¦ where this page comes from
- arch rolling: glab 1.128.0-1 Β· MIT
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms