Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

I'm trying to run Wget for a certain HTTP url, also using http-user and http-password command line options (tried the --user and --password, same results). Using the --no-check-certificate options as well so basically running this line :

wget --no-check-certificate --http-user=user --http-password=password https://url.com

I'm getting this response :

Connecting to url.com|10.11.10.98|:443... connected.
WARNING: cannot verify url.com's certificate, issued by `/C=IL/ST=url.com':
  Self-signed certificate encountered.
HTTP request sent, awaiting response... 400 Bad Request
2012-01-18 15:13:53 ERROR 400: Bad Request.

Please advise

share|improve this question
add comment

1 Answer

You're missing the option dashes for both --http-user and --http-password:

wget --server-response --no-check-certificate --http-user=user --http-password=password https://url.com

The fact that this appears to "look like" a URL to wget may be the reason it uses HTTP and not HTTPS for the real URL as well.

share|improve this answer
    
For single test requests like this, I can recommend using wget -O /dev/null -d [rest of options], this will show you useful debug output, including header exchanges between the client and the server, so you can see what's going on. –  SmallClanger Jan 18 '12 at 13:53
    
Thanks @adaptr, that was my mistake in retyping the command line for the question as the copy-paste didn't work.. :) –  akapulko2020 Jan 18 '12 at 15:50
    
Thanks @SmallClanger, I'll try that! –  akapulko2020 Jan 18 '12 at 15:51
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.