glab-variable
Manage GitLab CI/CD variables from the command line
TLDR
SYNOPSIS
glab variable command [flags]
DESCRIPTION
glab variable manages CI/CD variables for a GitLab project or group. It is a subcommand of glab, not a separate program. Commands that do not pass -g use the project that matches the git remote in the current directory.A masked variable is hidden in job logs. A protected variable is exposed only to pipelines on protected refs. A file variable is written to a temporary file when a job starts, and the job sees the path instead of the raw text. The default type is an environment variable injected into the job.
PARAMETERS
list
List variables. -g selects a group instead of the current project.get key
Print the value of one variable.set key value
Create or update a variable. -m masks it in job logs. -p makes it available only on protected branches and tags. -s limits it to an environment scope. -t sets the type: file, or an environment variable (the default).export
Print variables as assignments. -F env writes them in a form a shell can source.delete key
Delete a project variable.-h, --help
Show help and exit.
INSTALL
CAVEATS
get and export print secret values to the terminal. Group variables and project variables are different stores; -g is required to see the group ones. A protected variable is missing from pipelines that do not run on a protected ref.
SEE ALSO
glab(1), glab-repo(1), glab-label(1)
