Does anyone know how to get the value of a [MASKED] variable in Gitlab in one project which inherits this [MASKED] variable from another parent project where I don't have access?
Running the .gitlab-ci.yaml in the CI/CD pipelines in Gitlab gives me :
...
$ echo $ENV / $VERSION / $LEANIX_SERVICE_URL
development / 1.1.0 / [MASKED]
...
The settings of the project can be seen in the following screenshot :
You need to have maintainer or higher privileges on the Biz-IT
group (the group from which that variable is inherited) in order to see the value of the inherited variable. The hyperlink of the group name from your project Ci/CD variables settings will take you to the CI/CD settings page for the Biz-IT
group, if you have permissions to it. From that page, if you have permission, you can reveal the value.
While it is possible to expose the value in your job (see this answer) it's not a particularly good idea. The variable is probably masked for a reason -- because the person who created it doesn't want it exposed in job logs. You should strongly consider contacting an administrator or someone in that group with sufficient permissions if possible.