Download a release asset from GitLab via curl redirects to login page
Summary
Im trying to download release from GitLab using curl but it keeps getting redirected to the signin page.
How can I do this?
I have tried the following with no luck:
curl --header "PRIVATE-TOKEN: XXXXXXXXX" "https://gitlab2.mydomain.com/group/project/-/archive/v0.0.5/test-v0.0.5.zip"
### Steps to reproduce
If I try to download tarball from release page, from UI it accessible with link https://gitlab2.mydomain.com/group/project/uploads/d52e8a2bf2a406face2f949d875504b9/test-v0.0.5.zip
curl --header "PRIVATE-TOKEN: XXXXXXXXX" "https://gitlab2.mydomain.com/group/project/uploads/d52e8a2bf2a406face2f949d875504b9/test-v0.0.5.zip"
I receive this:
<html><body>You are being <a href="https://gitlab2.mydomain.com/users/sign_in">redirected</a>.</body></html>
My Gitlab-CI version is 11.10.4
Edited by Pavel Kozlov