I’ve looked up the documentation here: GitLab Token overview | GitLab
Under “Available scopes” it says that Job token is able to access the repository, but I am trying to use the folllowing command:
- curl "https://my.private.repo.com/api/v4/projects/$CI_PROJECT_ID/repository/archive.tar.gz?sha=$CI_COMMIT_SHA?job_token=$CI_JOB_TOKEN" --output file.tar.gz
But it doesn’t work. If I switch to my personal ACCESS_TOKEN it works. Why is this happening?