I am basically trying to do this
gl = gitlab.Gitlab('git.mygit.com', private_token='my_token')
gl.projects.get(ID).variables.get('KEY').value
but using CLI commands. I can get to the correct variable, but cannot access the value
gitlab project-variable get --project-id ID --key KEY
I noticed there is --value
option in the documentation of gitlab project-variable create
, but I can't find a way to access the value of already set project variable.
Just specify the output type (example: json):
gitlab -o json project-variable get --project-id ID --key KEY