title: What is the correct wget command syntax for HTTPS with username and password?
body: <p>I would like to download a file remotely with this URL using wget:</p>
  
  <pre><code>https://test.mydomain.com/files/myfile.zip
  </code></pre>
  
  <p>The site test.mydomain.com requires a login. I would like to download that file in my another server using this command but it does not work (does not completely download the file):</p>
  
  <pre><code>wget --user=myusername --password=mypassword https://test.mydomain.com/files/myfile.zip
  </code></pre>
  
  <p>If my username is myusername and password is mypassword what would be the correct wget syntax?</p>
  
  <p>The following are the return messages after I type the above command:</p>
  
  <pre><code>Resolving test.mydomain.com (test.mydomain.com)... 123.456.789
  Connecting to test.mydomain.com (test.mydomain.com)|123.456.789|:443... connected.
  HTTP request sent, awaiting response... 302 Found
  Location: https://test.mydomain.com/login/unauthorized [following]
  --2013-01-30 02:01:32--  https://test.mydomain.com/login/unauthorized
  Reusing existing connection to test.mydomain.com:443.
  HTTP request sent, awaiting response... 302 Found
  Location: https://test.mydomain.com/login [following]
  --2013-01-30 02:01:32--  https://test.mydomain.com/login
  Reusing existing connection to test.mydomain.com:443.
  HTTP request sent, awaiting response... 200 OK
  Length: unspecified [text/html]
  Saving to: `myfile.zip'
  </code></pre>
  
  <p>Am I missing something? Please help. Thanks.</p>