Thursday, February 16, 2017

Locked out of Jenkins? Don't worry.

You just setup a new Jenkins box, and you're trying to setup security, but somehow you end up with this screen:

User is missing the Overall/Read permission



All you need to do is go to $JENKINS_HOME/config.xml
?xml version='1.0' encoding='UTF-8'?>
<hudson>
  <disabledAdministrativeMonitors/>
  <version>2.45</version>
  <numExecutors>4</numExecutors>
  <mode>NORMAL</mode>
  <useSecurity>true</useSecurity>
  <authorizationStrategy class="hudson.security.AuthorizationStrategy$Unsecured"/>
  <securityRealm class="hudson.security.HudsonPrivateSecurityRealm">
    <disableSignup>true</disableSignup>
    <enableCaptcha>false</enableCaptcha>
  </securityRealm>

And change <useSecurity> to false. Then restart the jenkins process to pickup the change.

Now get back in there and configure it correctly!

No comments: