I was trying to create an offline copy of my password protected 1.5.1 gallery installation and none of the examples worked. I eventually dug down and discovered that the tag for "uname" had been changed to "username". Once I fixed that, it worked like a charm. I don't know what version changed the tag, but certainly 1.5.1 uses "username".
I used wget 1.10.1 on a WinXP platform (thus the double quotes).
My working command line (put this all on one line)
wget -r -k --html-extension --proxy=off --cookies=on "http://www.yourhost.com/gallery/login.php?username=yourusername&gallerypassword=yourpassword&login=Login&set_offline=true" "http://www.yourhost.com/gallery/"
Dave O