jenkins忘记密码怎么办?

在nginx配置文件中加上域名访问,重定向到本机的8080端口。

server {
listen 80;
server_name tomcat.qinyj.top;

root /application/tomcat8.0/webapps;
#index index.php index.html index.htm;

location / {
proxy_pass http://jenkins.qinyj.top:8080/jenkins;
}


charset utf-8;

但是访问之后忘记密码了,

在jenkins的安装目录下,找到config.xml配置文件,删除以下节点:

复制代码
<useSecurity>true</useSecurity>
<authorizationStategy class="hudson.sucrity.FullControlOnceLoggedInAuthorizationStrategy">
    ...
</authorizationStategy>
<securityRealm class="hudson.security.HudsonPrivateSecurityRealm">
   <disableSignup>false</disableSignup>
    ...
</securityRealm>
重启tomcat服务即可。
posted @ 2017-11-14 17:27  GeminiMp  阅读(323)  评论(0编辑  收藏  举报