passerby51
passerby51

Reputation: 955

Download with aria2 from a server with authentication

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:[email protected]/files/myfile

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

 aria2c http://username:[email protected]/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.

Upvotes: 8

Views: 9464

Answers (1)

Alex Potapenko
Alex Potapenko

Reputation: 176

aria2c http://username:[email protected]/files/myfile command should work if the server uses Basic Auth. Since it doesn't work for you, while wget http://username:[email protected]/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.

Upvotes: 1

Related Questions