Using CI_JOB_TOKEN to use repository files API returns 404
Summary
When using CI_JOB_TOKEN to download another project's file using the repository file raw API HTTP error 404 returns.
Steps to reproduce
- Create two private projects.
- Add token access from one project to another.
- Create CI pipelines for one of the projects.
- Try to download a file using the following url
${CI_API_V4_URL}/projects/${project_id}/repository/files/${path}/raw?ref=masterusingcurlheadersJOB-TOKEN: ${CI_JOB_TOKEN} - This results in a HTTP 404.
What is the current bug behavior?
Access declined by HTTP 404.
What is the expected correct behavior?
Download of the requested file.