CI_JOB_TOKEN not working as expected
I can not download artifacts with curl --header "JOB-TOKEN: $CI_JOB_TOKEN" "https://gitlab.example.com/api/v4/projects/$CI_PROJECT_ID/jobs/$CI_JOB_ID/artifacts" as documented here: https://docs.gitlab.com/ee/api/jobs.html. I am only getting {"message":"404 Project Not Found"} but if i use my PRIVATE-TOKEN instead it works.
Another issue i had is getting the JOB_ID of the job that uploads the artifact, which is different from the one for deployment.
https://gitlab.com/api/v4/projects/ID/pipelines/ID/artifacts/download?job=job_name not working :(
So i made a simple script to get the job_id... but this now needs a private-token instead of job-token...
Can CI_JOB_TOKEN actually be used for anything?
The repo is private, i've seen there where similar issues because of repo being private.