-
Bug
-
Resolution: Fixed
-
Trivial
-
None
Using v1.430 with LDAP Security Realm and Project-based Matrix Authorization Strategy Authorization
From a Linux box with a .ssh dir containing private and public key files:
$ java -jar jenkins-cli.jar -s http://jenkins:8080/ build -s test --username user --password-file password.txt
Failed to authenticate with your SSH keys. Proceeding with anonymous access
Completed test_promo #5 : SUCCESS
--> accepts provided credentials and works, but shows a misleading message (it is not using anonymous access)
This is because the server does proceed with the anonymous access at the time of printing out this message.
It then uses --username and --password-file to authenticate the user, which succeeds, hence the whole thing completes.
Basically, it's two systems interacting in an unexpected way (and given that CliAuthenticator is extensible, I don't see how they can work together.)
I'm going to fix this by simply removing "Proceeding with anonymous access" from the message in all cases. I think if the command fails due to the access control, then hopefully the user can relate that with the error message "Failed to authenticate with your SSH keys" and still notice that they need to fix the permission stuff.