今天在配置Jenkins的自动部署功能,手动构建时报“The username you provided is not allowed to use the text-based Tomcat Manager (error 403)”错误,如图
用于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角色即可。
进入到tomcat的conf目录下,编辑tomcat-users.xml配置文件
添加manager-script角色,并赋予角色给admin
Jenkins再次手动构建则构建成功。