geerlingguy / ansible-role-jenkins

Ansible Role - Jenkins CI
https://galaxy.ansible.com/geerlingguy/jenkins/
MIT License
832 stars 747 forks source link

Jenkins plugins fail with error 401 #389

Open Hraesvelg opened 3 months ago

Hraesvelg commented 3 months ago

hi,

i try to define some plugin to install with this ansible role :

jenkins_plugins:
  - "folder-properties"
  - "echarts-api"
  - ...

but result is always the same, I tested some fix found in other topic without success

TASK [geerlingguy.jenkins : Install Jenkins plugins using password.] *************************************************************************************************************************************************************
FAILED - RETRYING: [*.*.*.*]: Install Jenkins plugins using password. (3 retries left).
FAILED - RETRYING: [*.*.*.*]: Install Jenkins plugins using password. (2 retries left).
FAILED - RETRYING: [*.*.*.*]: Install Jenkins plugins using password. (1 retries left).
failed: [*.*.*.*] (item=folder-properties) => {"ansible_loop_var": "item", "attempts": 3, "changed": false, "details": "**HTTP Error 401: Unauthorized**", "item": "folder-properties", "msg": "**Cannot get CSRF**"}
FAILED - RETRYING: [*.*.*.*]: Install Jenkins plugins using password. (3 retries left).
Hraesvelg commented 3 months ago

solved ! don't use complex password.. or think to escape special if possible...

CedricLevasseur commented 1 month ago

Hello @Hraesvelg I have the same issue. I'm not sure to understand the resolution. What is the password used for ? I don't think it's a login/password for downloading the plugins ? It's not the password of my user when connecting in Jenkins ? Oh may be it's the admin default password ?

Thanks for your answer. Cedric

Hraesvelg commented 1 month ago

Hello @CedricLevasseur ,

in my case it was the password behind jenkins_admin_password

and i didn't find rules to define password but like postgres, not optimal for security reason but classical letter and digit do the job...