tags:

views:

18

answers:

2

I am trying to back up one of my sites that is password protected using wget. I can't seem to format the command correctly because I keep getting 401 errors:

wget http://dev.example.com/"Login?mode=login
> &user-username=TYPEUSERNAMEHERE&user-password=TYPEPASSWORDHERE"

Can anyone tell me what I am doing wrong here? What is the correct way to download an entire directory that is password protected using wget? Thanks!

+1  A: 

Wait I got it: wget -r --http-user=USERNAME --http-passwd='PASSWORD'

Thomas
+1  A: 

If the password protection is by htaccess you have to form your url like http://USERNAME:PASSWORD@Domain.

Sebastian Thiele