How do I get back into Jenkins if I am locked out?

If you accidentally enable a security option and are met with a login screen and no way to login, you can:

1. Shutdown Jenkins

$ sudo service jenkins stop

2. Edit config.xml in the Jenkins home directory:

$ sudo vi /var/lib/jenkins.config.xml

..find “true” and change “true” to “false”.

..and remove the XML blocks for sections “authorizationStrategy” and “securityRealm”.

Re-start Jenkins:

$ sudo service jenkins start

Share: These icons link to social bookmarking sites where readers can share and discover new web pages.
  • Twitter
  • Facebook
  • Google Bookmarks
  • LinkedIn
  • Reddit
  • StumbleUpon

Leave a Reply

Your email address will not be published. Required fields are marked *