如何在詹金斯禁用安全检查? [英] How to disable security checking in Jenkins?
问题描述
在任何答案和詹金斯网站上,告诉我设置
In any answer and in jenkins website tell me to set
<useSecurity>true</useSecurity>
在config.xml中,但在我的jenkins文件夹中没有此文件
in config.xml but in my jenkins folder don't have this file
推荐答案
这听起来像是无效的Jenkins安装,或者文件位于$JENKINS_HOME
或$CATALINA_OPTS
指向的其他位置(例如~/.jenkins
或/var/usr/jenkins/.jenkins
).
This likely sounds like invalid Jenkins installation, or the file is in another place pointed by $JENKINS_HOME
or $CATALINA_OPTS
(e.g. ~/.jenkins
or /var/usr/jenkins/.jenkins
).
另一个原因可能是,默认情况下,Jenkins从内存加载所有数据,并且您需要从文件系统重新加载配置文件,因此请尝试重新启动Jenkins.
Another reason could be that by default Jenkins load all data from memory and you need to reload the configuration files from file system, so try restarting Jenkins.
然后在系统属性(在/systemInfo
中)中再次检查user.home
指向您期望该文件的文件夹.还要检查您的系统日志(/log/all
)是否存在任何问题.
Then double check in System Properties (at /systemInfo
) that user.home
points to the folder where you expect that file. Check also your System Log (/log/all
) for any issues.
如果上述操作无济于事,请检查文件夹的权限以及是否有足够的空间(但仍然应该有一些错误).或尝试重新安装Jenkins.
If above won't help, check the folder permission and if there is enough space (but you should have some error anyway). Or try reinstalling Jenkins.
根据 管理Jenkins 文档页面上,config.xml
Jenkins根目录配置应始终位于您的JENKINS_HOME
文件夹中.
According to Administering Jenkins documentation page, the config.xml
Jenkins root configuration should be always in your JENKINS_HOME
folder.
获得config.xml
后,要禁用安全性,请删除带有useSecurity
和authorizationStrategy
的行,然后重新启动Jenkins,或尝试执行以下命令:
Once you've got config.xml
, to disable security remove the lines with useSecurity
and authorizationStrategy
and restart Jenkins, or try executing these commands:
sudo ex +g/useSecurity/d +g/authorizationStrategy/d -scwq /var/lib/jenkins/config.xml
sudo /etc/init.d/jenkins restart
这篇关于如何在詹金斯禁用安全检查?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!