Htaccess Auth for wget and curl

You can download files protected by Basic Htaccess Auth via wget like that: $> wget –http-user=USERNAME –http-password=PASSWORD http://nice.file.url Or via curl like that: $> curl -u USER:PASSWORD http://www.caplantic.de  

Download password protected file over shell

Therefore we use wget: wget -O outputfile.txt –user sheldon –ask-password https://ask-sheldon.com/genius-stuff.html # f.e. REST wget –http-user USER –http-password PASSWOR http://ask-sheldon.com/import.txt # HTACCESS protection If you let -O param out the output will be stored under its original name.