Skip to content

mw gitlab variable update

Releasev0.35.0 · cfeceb67

mw gitlab variable update <key> <value> [flags]

Update an existing variable for a project or group.

-d, --description <string>
Set description of a variable.
-g, --group <string>
Set variable for a group.
-m, --masked
Whether the variable is masked.
-p, --protected
Whether the variable is protected.
-r, --raw
Whether the variable is treated as a raw string.
-s, --scope <string>
The environment_scope of the variable. Values: all (*), or specific environments. Default: *.
-t, --type <string>
The type of a variable: env_var, file. Default: env_var.
--value <string>
The value of a variable.
-h, --help
Show help for this command.
--no-interaction
Do not ask any interactive questions
--profile <string>
Saved account profile (login defaults to the verified username)
-R, --repo <OWNER/REPO>
Select another repository. Can use either OWNER/REPO or `GROUP/NAMESPACE/REPO` format. Also accepts full URL or Git URL.
-v, --verbose <count>
Increase output verbosity. Example: --verbose=2 or -vv
Terminal window
$ glab variable update WITH_ARG "some value"
$ glab variable update FROM_FLAG -v "some value"
$ glab variable update FROM_ENV_WITH_ARG "${ENV_VAR}"
$ glab variable update FROM_ENV_WITH_FLAG -v"${ENV_VAR}"
$ glab variable update FROM_FILE < secret.txt
$ cat file.txt | glab variable update SERVER_TOKEN
$ cat token.txt | glab variable update GROUP_TOKEN -g mygroup --scope=prod
Report an issue with this page

Report a documentation issue

The report includes this page’s link, section and documentation version.

Review and submit on Phabricator, or run the command using your saved CLI profile. The command asks before creating the task.