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.

Leave a Reply

Your email address will not be published. Required fields are marked *

 

This site uses Akismet to reduce spam. Learn how your comment data is processed.