File API: Accessing files in subfolders leads to redirect

I seem to only be able to access the top level Files in my Repo, if I try to access any files that are located in folders, I am being redirected to the login page:
Repo content:

This works:
curl “xxx/api/v4/projects/114/repository/files/.gitignore/raw?ref=master&private_token=xxx”

This causes a redirect:
curl “xxx/api/v4/projects/114/repository/files/test%2Ftest.txt/raw?ref=master&private_token=xxx”

Repsonse: “You are being redirected.”

I followed these instructions:

I tried with a read_only filea access and with a api access token.
Any ideas?