I have a private key for deployment which I have set as a File Environment variable in the gitlab ci settings. However when I try and do
echo $VAR
the output is the entire contents of the key something like
----BEGIN PRIVATE KEY---
dfbvjladfbgvjksadbavkjabdfjnvkdjbnv;sdf98qw374yriuebglvkjsdfgydjkfvnldafkjbvgjkaldb
----END PRIVATE KEY---
I would like to have this key stored in a file and would like the path to the file as the environment variable $VAR. I am unsure of how to do this. Any help will be appreciated.