Skip to content

Access RAW files using deploy key

It would be good if GitLab provided the ability to access the RAW files in a repository via HTTP(S) using a deploy token. ie:

curl https://deploy-user:<token>@gitlab.example.com/user/repository/raw/master/README.md

Currently the only work-around seems to be accessing files via the API like:

curl --header 'PRIVATE-TOKEN: <token>' https://gitlab.example.com/api/v4/projects/user%2repository/repository/files/README.md/raw?ref=master

which seems a bit of a kludge and a bit unwieldy.