I am trying to fetch a gitlab release from the CI to compute its 256 hash. I have the following statement in my .gitlab-ci.yml
- export RELEASE_PATH="https://gitlab.com/[masked]/libs/${CI_PROJECT_NAME}/-/archive/0.2.11/${CI_PROJECT_NAME}-0.2.11.tar.gz"
- "curl --header "JOB-TOKEN: $CI_JOB_TOKEN" ${RELEASE_PATH} -o ${CI_PROJECT_NAME}-${APP_VERSION}.tar.gz"
I know for sure the url is correct, I have tested it outside the CI using a PRIVATE-TOKEN and works fine. However, when the CI is executed, I am getting a file with the following content
<html><body>You are being <a href="https://gitlab.com/users/sign_in">redirected</a>.</body></html>%
Is it possible to fetch the tar.gz from the CI? If so, how?