Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

plugin authentication issue #61

Closed
mpodber1971 opened this issue Jan 23, 2017 · 1 comment
Closed

plugin authentication issue #61

mpodber1971 opened this issue Jan 23, 2017 · 1 comment

Comments

@mpodber1971
Copy link

when trying to run the jenkins cli in plugins.yml, i get an error about authentication
ERROR: You must authenticate to access this Jenkins.
Use --username/--password/--password-file parameters or login command.

i have tried using admin with locally stored admin password to no avail. how did you work around this or fix?

@mpodber1971
Copy link
Author

i figured out a solution. it has to do with the downloaded jenkins-cli.jar appears to be incompatible with the version of jenkins installed on the instance. Therefore, the best thing to do is copy the already installed jenkins-cli.jar to the same directory as what would have been downloaded

in cli.yml,

change this

  • name: Get Jenkins CLI
    get_url:
    url: "{{ jenkins_api_url }}jnlpJars/jenkins-cli.jar"
    dest: "{{ jenkins_cli_dest }}"
    mode: 0440
    register: jenkins_local_cli
    until: "'OK' in jenkins_local_cli.msg or 'file already exists' in jenkins_local_cli.msg"
    retries: 5
    delay: 10

to

  • name: Get Jenkins CLI
    command: "cp /var/cache/jenkins/war/WEB-INF/jenkins-cli.jar {{ jenkins_cli_dest }}"
    become: yes

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant