Jenkins部署: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)”错误,如图
这里写图片描述
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配置文件
这里写图片描述
添加manager-script角色,并赋予角色给admin
这里写图片描述
4、结果
Jenkins再次手动构建则构建成功。
这里写图片描述

转至http://blog.csdn.net/jay_1989/article/details/52861620

posted @ 2017-08-18 11:06  nxw_tsp  阅读(482)  评论(0)    收藏  举报