Download single file with curl get an error


I have yesterday updated my gitLab Server from 8.5.x to 9.2.7. Before the update it was possible download a singlefile with following command:

curl http://<myip>/<link>/<file>?private_token="<PrivateToken>"

after the update I get the error

You are being <a href="http://<myip>/users/sign_in">redirected</a>.</body></html>You have new mail in /var/spool/mail/root

If I enable the extended logging with -vvv for curl I get the error

  • About to connect() to port 80 (#0)
  • Trying…
  • Connected to ( port 80 (#0)

GET //?private_token=“PrivateToken” HTTP/1.1
User-Agent: curl/7.29.0
Accept: /

< HTTP/1.1 302 Found
< Server: nginx
< Date: Fri, 23 Jun 2017 08:44:54 GMT
< Content-Type: text/html; charset=utf-8
< Content-Length: 98
< Connection: keep-alive
< Cache-Control: no-cache
< Location:
< Set-Cookie: _gitlab_session=; path=/; HttpOnly
< X-Content-Type-Options: nosniff
< X-Frame-Options: SAMEORIGIN
< X-Request-Id:
< X-Runtime: 0.041467
< X-Xss-Protection: 1; mode=block
< Strict-Transport-Security: max-age=31536000

  • Connection #0 to host left intact

what can I do in the new version so that it working again?


I have find the error. I create the User over API and in the new version a new user needs a confirmation over mail. I have the API call extended with confirm=false and everything works again.