Jenkins忘记管理员密码处理

时间:2022-07-31 16:58:29

1、先找到jenkins安装目录打开config.xml文件。

2、然后编辑,删除以下部分:

<useSecurity>true</useSecurity>

 <authorizationStrategyclass="hudson.security.FullControlOnceLoggedInAuthorizationStrategy">

   <denyAnonymousReadAccess>true</denyAnonymousReadAccess>

 </authorizationStrategy>

 <securityRealmclass="hudson.security.HudsonPrivateSecurityRealm">

   <disableSignup>true</disableSignup>

   <enableCaptcha>false</enableCaptcha>

 </securityRealm>
3、重启服务(容器启动,则重启容器)