8

I have a file on a server under my account and I need to download it. Let us say that the url is http://my.server/files/myfile. I need to authenticate with username and password. I can do that with wget as follows

 wget http://username:password@my.server/files/myfile

and it works. However, trying the same thing with aria2

 aria2c http://username:password@my.server/files/myfile

fails with error message

-> [HttpSkipResponseCommand.cc:211] errorCode=24 Authorization failed.

Is there a way to fix this? I have also tried --http-user and --http-passwd options with no luck.

passerby51
  • 835
  • 2
  • 9
  • 23
  • 1
    Did you ever get this fixed? I'm having the same problem. – Nick Oct 28 '15 at 11:53
  • 2
    @Nick, unfortunately not. The problem seems to be that aria2c does not support http digest authentication, according to this: http://unix.stackexchange.com/questions/151494/issues-with-aria2c-and-basic-auth-wget-working – passerby51 Oct 31 '15 at 21:39
  • 1
    Just testet with aria2c 1.31.0, it works. – BladeMight Jun 27 '17 at 18:44
  • Does aria2c support `wget "https://mysite/data/" --header "Authorization: Bearer amF5YW1ldDphbUY1WVcMGViYzg1" -P .` – Krishnaap Nov 10 '21 at 07:52

1 Answers1

0

aria2c http://username:password@my.server/files/myfile command should work if the server uses Basic Auth. Since it doesn't work for you, while wget http://username:password@my.server/files/myfile does, most likely the server uses some other authorization protocol that wget supports (but not aria2c), namely Digest Auth or NTLM Auth: see this curl comparison table.