The API endpoint for raw files is: GET /projects/:id/repository/files/:file_path/raw .
If the file is in a private repository, you must authenticate using a . You will also need the Project ID , which can be found on the project's main overview page.
When working within a GitLab CI/CD pipeline, you can use the predefined CI_JOB_TOKEN to authenticate and download files from other projects that the runner has access to. about.gitlab.com Repository files API - GitLab Docs