Srividya K
Srividya K

Reputation: 785

Validation error while trying to add Firebase token in Gitlab CI environment variable

I want to add the token that I generated in firebase-tools using firebase login:ci to Gitlab CI. I went to Settings -> CI/CD -> Variables and added the environment variable with the key as FIREBASE_TOKEN.

However I get:

Validation failed: 
- Variables value is invalid. 

The value I gave is a 25 digit key generated by Firebase CLI as mentioned above.
What is wrong in this and what must I do?

Upvotes: 0

Views: 338

Answers (1)

Srividya K
Srividya K

Reputation: 785

I found the answer myself. Gitlab doesn't allow certain characters, such as - or / as the value for the environment variables. So I split the key into 2 environment variables.

EDIT #1: The problem was because I had the option 'Mask' turned on. So turned it off and I was able to give the whole key as a single variable. Voila!

Upvotes: 1

Related Questions