gitlab-vars icon indicating copy to clipboard operation
gitlab-vars copied to clipboard

Error when import files

Open DevFontes opened this issue 2 years ago • 1 comments

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

DevFontes avatar Jul 04 '23 19:07 DevFontes

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.

T-vK avatar Oct 18 '23 10:10 T-vK