gitlab-vars
gitlab-vars copied to clipboard
Error when import files
I can export the variables normally, I assume the application settings are correct
$ glvars export
Using config file: /home/user/.glvars.yaml
[
{
"variable_type": "env_var",
"key": "a",
"value": "1",
"protected": false,
"masked": false,
"raw": false,
"environment_scope": "*"
}
]
$ glvars import -f ./gitlab-ci-cd-vars.json
Using config file: /home/user/.glvars.yaml
invalid character 'U' looking for beginning of value
This happens when the JSON file is invalid.
Easy mistake to make because glvars export > vars.json produces invalid json. To fix it, delete the first line "Using config file: /home/user/.glvars.yaml". Everything below that should be valid json.