Hudson authentication via wget is return http error 302

Posted by Rafael on Server Fault See other posts from Server Fault or by Rafael
Published on 2011-02-03T15:34:38Z Indexed on 2012/03/31 23:34 UTC
Read the original article Hit count: 450

Filed under:
|
|

I'm trying to make a script to authenticate in hudson using wget and store the authentication cookie.

The contents of the script is this:

wget \
--no-check-certificate \
--save-cookies /home/hudson/hudson-authentication-cookie \
--output-document "-" \
'https://myhudsonserver:8443/hudson/j_acegi_security_check?j_username=my_username&j_password=my_password&remember_me=true'

Unfortunately, when I run this script, I get:

--2011-02-03 13:39:29--  https://myhudsonserver:8443/hudson/j_acegi_security_check?     j_username=my_username&j_password=my_password&remember_me=true
Resolving myhudsonserver... 127.0.0.1
Connecting to myhudsonserver|127.0.0.1|:8443... connected.
WARNING: cannot verify myhudsonserver's certificate, issued by `/C=Unknown/ST=Unknown/L=Unknown/O=Unknown/OU=Unknown/CN=myhudsonserver':
  Self-signed certificate encountered.
HTTP request sent, awaiting response... 302 Moved Temporarily
Location: https://myhudson:8443/hudson/;jsessionid=087BD0B52C7A711E0AD7B8BD4B47585F    [following]
--2011-02-03 13:39:29--      https://myhudsonserver:8443/hudson/;jsessionid=087BD0B52C7A711E0AD7B8BD4B47585F
Reusing existing connection to myhudsonserver:8443.
HTTP request sent, awaiting response... 404 Not Found
2011-02-03 13:39:29 ERROR 404: Not Found.

There's no error log in any of hudson's tomcat log files.

Does anyone has any idea about what might be happening?

Thanks.

© Server Fault or respective owner

Related posts about http

Related posts about redirect