I want to use curl to download my private repo in GitLab. I know I can use the Gitlab API, but for some reason, It doesn\'t work.
Is this possible? When
You can, but you need to authenticate yourself (as in "Gitlab API: How to generate the private token")
curl http://gitlab.server/api/v3/session --data 'login=myUser&password=myPass'
Then with the private token:
curl --header "PRIVATE-TOKEN: QVy1PB7sTxfy4pqfZM1U" "http://example.com/api/v3/projects"
Or, in your case, get the repository files:
GET /projects/:id/repository/files
Or, download directly one file.