hudson安全矩阵config.xml配置问题解决办法:
曾经在修改hudson安全控制配置的时候遇到了错误,总是报出IOException,页面无法正常打开:
Caused by: com.thoughtworks.xstream.converters.ConversionException: only START_TAG can have attributes END_TAG seen ...ategy class="hudson.security.ProjectMatrixAuthorizationStrategy"/>... @7:86 : only START_TAG can have attributes END_TAG seen ...ategy class="hudson.security.ProjectMatrixAuthorizationStrategy"/>... @7:86
--- Debugging information ---
message : only START_TAG can have attributes END_TAG seen ...ategy class="hudson.security.ProjectMatrixAuthorizationStrategy"/>...
----------------------------------------------------------------------------------------------------------
解决办法:通过后台修改$HUDSON_HOME/config.xml,然后重启hudson即可:
参考配置如下:
<?xml version='1.0' encoding='UTF-8'?>
<hudson>
<version>2.2.1</version>
<numExecutors>2</numExecutors>
<mode>NORMAL</mode>
<useSecurity>true</useSecurity>
<authorizationStrategy class="hudson.security.ProjectMatrixAuthorizationStrategy">
<permission>hudson.model.Computer.Configure:haochuang</permission>
<permission>hudson.model.Computer.Configure:admin</permission>
<permission>hudson.model.Computer.Delete:haochuang</permission>
<permission>hudson.model.Computer.Delete:admin</permission>
<permission>hudson.model.Hudson.Administer:haochuang</permission>
<permission>hudson.model.Hudson.Read:haochuang</permission>
<permission>hudson.model.Item.Build:haochuang</permission>
<permission>hudson.model.Item.Build:admin</permission>
<permission>hudson.model.Item.Configure:haochuang</permission>
<permission>hudson.model.Item.Configure:admin</permission>
<permission>hudson.model.Item.Create:haochuang</permission>
<permission>hudson.model.Item.Create:admin</permission>
<permission>hudson.model.Item.Delete:haochuang</permission>
<permission>hudson.model.Item.Delete:admin</permission>
<permission>hudson.model.Item.Read:haochuang</permission>
<permission>hudson.model.Item.Workspace:haochuang</permission>
<permission>hudson.model.Item.Workspace:admin</permission>
<permission>hudson.model.Run.Delete:haochuang</permission>
<permission>hudson.model.Run.Delete:admin</permission>
<permission>hudson.model.Run.Update:haochuang</permission>
<permission>hudson.model.Run.Update:admin</permission>
<permission>hudson.model.View.Configure:haochuang</permission>
<permission>hudson.model.View.Configure:admin</permission>
<permission>hudson.model.View.Create:haochuang</permission>
<permission>hudson.model.View.Create:admin</permission>
<permission>hudson.model.View.Delete:haochuang</permission>
<permission>hudson.model.View.Delete:admin</permission>
<permission>hudson.scm.SCM.Tag:haochuang</permission>
</authorizationStrategy>
<securityRealm class="hudson.security.HudsonPrivateSecurityRealm">
<disableSignup>false</disableSignup>
<enableCaptcha>true</enableCaptcha>
<notifyUser>true</notifyUser>
</securityRealm>
<markupFormatter class="hudson.markup.RawHtmlMarkupFormatter"/>
<configuredWorkspaceRoot></configuredWorkspaceRoot>
<jdks/>
<viewsTabBar class="hudson.views.DefaultViewsTabBar"/>
<myViewsTabBar class="hudson.views.DefaultMyViewsTabBar"/>
<clouds/>
<slaves/>
<quietPeriod>5</quietPeriod>
<scmCheckoutRetryCount>0</scmCheckoutRetryCount>
<views>
<hudson.model.AllView>
<owner class="hudson" reference="http://www.cnblogs.com/.."/>
<name>All</name>
<filterExecutors>false</filterExecutors>
<filterQueue>false</filterQueue>
</hudson.model.AllView>
</views>
<primaryView>All</primaryView>
<slaveAgentPort>0</slaveAgentPort>
<label></label>
<nodeProperties/>
<globalNodeProperties/>
<disabledAdministrativeMonitors/>
</hudson>
本文转自 念槐聚 博客园博客,原文链接:http://www.cnblogs.com/haochuang/archive/2012/06/12/2545965.html,如需转载请自行联系原作者