-
Bug
-
Resolution: Fixed
-
Major
-
None
-
Vista 32bit, JDK 1.6.0_18, Hudson 1.350
According to Hudson 1.350 changelog:
- Authentication support in Hudson CLI. (issue 3796)
it should be possible now to use the CLI when Authorization is set up... but it does not seem to work.
My setup:
- Enable security ticked
- Authorization Matrix-based security
Anonymous (all denied)
admin (all allowed)
I can only login at the Hudson dashboard if I use the admin account.
But when I try to use the hudson CLI (downloaded the jar file from http://localhost:8080/hudson/cli) I get:
C:\Work\hudson>java -jar hudson-cli.jar -s http://localhost:8080/hudson help
Exception in thread "main" java.io.IOException: Server returned HTTP response code: 403 for URL: http://localhost:8080/hudson/cli
at sun.net.www.protocol.http.HttpURLConnection.getInputStream(Unknown Source)
at hudson.cli.FullDuplexHttpStream.<init>(FullDuplexHttpStream.java:51)
at hudson.cli.CLI.<init>(CLI.java:90)
at hudson.cli.CLI.<init>(CLI.java:62)
at hudson.cli.CLI.main(CLI.java:171)
The same happens when I provide the username and password details:
C:\Work\hudson>java -jar hudson-cli.jar -s http://localhost:8080/hudson help --username admin --password theRightPassword
Exception in thread "main" java.io.IOException: Server returned HTTP response code: 403 for URL: http://localhost:8080/hudson/cli
at sun.net.www.protocol.http.HttpURLConnection.getInputStream(Unknown Source)
at hudson.cli.FullDuplexHttpStream.<init>(FullDuplexHttpStream.java:51)
at hudson.cli.CLI.<init>(CLI.java:90)
at hudson.cli.CLI.<init>(CLI.java:62)
at hudson.cli.CLI.main(CLI.java:171)
is this the correct way to provide auth credentials via the CLI args?
I'm trying to use CLI in 1.355 in authenticated mode.
Login command seems to work - returns nothing. But when i try to run any other (f.e. groovysh) command after login it says that anonymous is missing Administer permission. Also i was trying to run groovysh like this:
java -jar hudson-cli.jar -s ServerURL groovysh --username adminuser --password correctpass and it says the same.
The only thing i was able to perform so far is to quiet-down