锁定Jenkins - 删除config.xml无法修复

时间:2016-04-20 08:51:14

标签: jenkins

我刚刚搞砸了Jenkins的配置,现在我再也无法访问它了。每当我登录时,我都会收到错误cas is missing the Overall/Read permission

我已尝试更改config.xml并删除securityRealmauthorizationStrategy并将useSecurity更改为false。这不起作用所以我想我完全删除了config.xml,这也没有用。

我还能做些什么来回到Jenkins系统吗?

谢谢!

编辑:我使用service jenkins restart

重新启动了jenkins

这是我的詹金斯config.xml

<?xml version='1.0' encoding='UTF-8'?>
<hudson>
  <disabledAdministrativeMonitors/>
  <version>1.656</version>
  <numExecutors>2</numExecutors>
  <mode>NORMAL</mode>
  <useSecurity>false</useSecurity>
  <disableSignup>false</disableSignup>
  <disableRememberMe>false</disableRememberMe>
  <projectNamingStrategy class="jenkins.model.ProjectNamingStrategy$DefaultProjectNamingStrategy"/>
  <workspaceDir>${ITEM_ROOTDIR}/workspace</workspaceDir>
  <buildsDir>${ITEM_ROOTDIR}/builds</buildsDir>
  <markupFormatter class="hudson.markup.EscapedMarkupFormatter"/>
  <jdks/>
  <viewsTabBar class="hudson.views.DefaultViewsTabBar"/>
  <myViewsTabBar class="hudson.views.DefaultMyViewsTabBar"/>
  <clouds/>
  <quietPeriod>5</quietPeriod>
  <scmCheckoutRetryCount>0</scmCheckoutRetryCount>
  <views>
    <hudson.model.AllView>
      <owner class="hudson" reference="../../.."/>
      <name>All</name>
      <filterExecutors>false</filterExecutors>
      <filterQueue>false</filterQueue>
      <properties class="hudson.model.View$PropertyList"/>
    </hudson.model.AllView>
  </views>
  <primaryView>All</primaryView>
  <slaveAgentPort>0</slaveAgentPort>
  <label></label>
  <crumbIssuer class="hudson.security.csrf.DefaultCrumbIssuer">
    <excludeClientIPFromCrumb>false</excludeClientIPFromCrumb>
  </crumbIssuer>
  <nodeProperties/>
  <globalNodeProperties/>
</hudson>

1 个答案:

答案 0 :(得分:0)

似乎有另一个隐藏目录(/var/usr/jenkins/.jenkins对我来说)包含另一个config.xml。修改此文件实际上传播了我所做的更改。

我不确定/var/usr/jenkins/config.xml的用途是什么,修改它似乎并没有实际影响某些东西,除非出现语法错误(在这种情况下,它会引发异常)< / p>