The username you provided is not allowed to use the text-based Tomcat Manager (error 403)
1.背景及现象
在配置Jenkins的自动部署功能,手动构建时报“The username you provided is not allowed to use the text-based Tomcat Manager (error 403)”错误,如图:
.jpg)
2.原因
用于tomcat7自动部署的管理用户必须具有manager-script角色,manager-gui角色是不够的,不然会有错误出现:
The username you provided is not allowed to use the text-based Tomcat Manager (error 403)
在/etc/tomcat7/tomcat-users.xml文件中为管理用户添加manager-script角色即可。
3.解决方法
进入到tomcat的conf目录下,编辑tomcat-users.xml配置文件

1
2
3
4<role rolename="admin-gui"/>
<role rolename="manager-gui"/>
<role rolename="manager-script"/>
<user username="tomcat" password="tomcat" roles="admin-gui,manager-gui,manager-script"/>进入到tomcat的webapps/manager/META_INF/context.xml文件,将文件中对访问的来源受限设置注释
1 | <Context antiResourceLocking="false" privileged="true" > |
- 重启tomcat,再次构建即可
原文链接 https://www.cnblogs.com/wanghy898/p/11257574.html
原文链接 https://blog.csdn.net/Jay_1989/article/details/52861620?utm_source=blogxgwz2
本博客所有文章除特别声明外,均采用 CC BY-NC-SA 4.0 许可协议。转载请注明来自 轨 道 兔!
评论
