Jenkins login issue

Just setup jenkins on Ubuntu v16 laptop.

I have followed the installation steps from this page

After I setup, I fetched the setup password from /var/logs/jenkins/jenkins.log & was able to setup the admin user/password. I made a note of the creds.

I was also able to access & setup a simple helloworld pipeline job .

I stepped out and came back to my desk after about 20mins. The session has logged me out & I am not able to log-in with the creds. I have tried removing jenkins & setting it back. It still seems to retain the creds somewhere & now I am getting to the login page with bad credentials error everytime.

Invalid login information. Please try again. 
Try again
If you are a system administrator and suspect this to be a configuration problem, see the server console output for more details.

Need help figuring out what is happening. My logs have no useful information related to this error.


As stated in this answer, the quickest way to get around this would be to disable security altogether by making the following change to your Jenkins config.xml file:

<useSecurity>true</useSecurity>

After rebooting your Jenkins instance, you should be able to return to the admin page and set everything up from there.

An alternate solution to this is mentioned here, which should accomplish what you want whereby preserving the security of your Jenkins instance (thus making this a more ideal solution). You would instead update the passwordHash section of your Jenkins config.xml file:

<passwordHash>#jbcrypt:$2a$10$razd3L1aXndFfBNHO95aj.IVrFydsxkcQCcLmujmFQzll3hcUrY7S</passwordHash>

The passwordHash section of the config.xml file is a child tag under <hudson.security.HudsonPrivateSecurityRealm_-Details> .

You would again need to reboot Jenkins once this change has been made, and you would login using the password 'test'. Of course, you could provide your own hash of a different password which would be advisable.

链接地址: http://www.djcxy.com/p/35210.html

上一篇: 通过REST API进行长轮询

下一篇: 詹金斯登录问题