Jenkins部署:The username and password you provided are not correct (error 401)
来源:互联网 发布:淘宝买单机游戏 编辑:程序博客网 时间:2024/05/22 13:37
这类错误是Jenkins部署war包到tomcat的 webapps下发生的错误
要做到这一步我们需要下载一个插件Deploy to container Plugin
然后再增加构建后操作步骤选项中选Deploy war/ear to a Container
这里面的WAR/EAR files要和项目中的build.xml文件中的一个属性保持一致如图
1、WAR/EAR files:输入war包的相对路径,如我的war包在新建目录的target下
2、context path:输入用来访问tomcat的名称,localhost:8080/p**
3、add container:增加容器,一般选tomcat 就可以。
4、tomcat-users.xml中的用户名及密码默认是注释掉的,所以需要删除注释,也可以直接复制以下代码到之前。如果只是删除注释的话好像部署不会成功,还需要增加manager开头的三个role才可以。
在使用jenkins部署项目的过程中发现build成功后会抱一个401的错误
点击图中标记的链接会跳出页面
让输入tomcat的用户名和密码,这时候点击取消
点击取消后会有提示,红框标注的意思大概是:“您没有权限查看此页。如果你没有更改任何配置文件,请检查您的安装文件conf/tomcat-users.xml。该文件必须包含证书让你使用这个程序。
例如,添加manager-gui作用一个用户名为tomcat的密码的s3cret,添加以下上面列出的配置文件。”
那么我们就按照提示去Tomcat文件夹找到相应的文件conf/tomcat-users.xml然后修改它。
我们可以看到,当我们第一次打开tomcat-users.xml这个文件的时候它的标签中间部分是被注释掉的,我们需要做的就是把注释打开并添加manager-gui
修改完之后我们在重新部署项目就不会出现以上401错误了。
- Jenkins部署:The username and password you provided are not correct (error 401)
- Jenkins部署:The username you provided is not allowed to use the text-based Tomcat Manager (error 403)
- Password authentication failed, Please verify that the username and password are correct
- Login failed:make sure your username and password are correct and that you’re an admin or moderator
- The username you provided is not allowed to use the text-based Tomcat Manager (error 403)
- Check if the name and password are correct for domain
- Please enter the correct username and password for a staff account. Note tha
- SharePoint创建web application出现“The password supplied with the username was not correct. Verify that i
- HTTP Error 404.2 - Not Found "The page you are requesting cannot be served because of the ISAPI and
- EM RemoteOperationException: ERROR: Invalid username and/or password
- EM RemoteOperationException: ERROR: Invalid username and/or password
- Could not read from remote repository.Please make sure you have the correct access rights.and the re
- Today, I found Oracle DB's username and password are case sensitive.
- The database has local access protection and you are not authorized to access it locally
- [ERROR] You have enabled the binary log, but you haven't provided the mandatory server-id.
- The credentials you provided during SQL Server 2008 install are invalid.
- Maven+jenkins: No compiler is provided in this environment. Perhaps you are running on a JRE rather
- The following URL schemes found in your app are not in the correct format 解决方案
- 用机器算法预测自杀倾向
- Sqlplus里如何调用Shell脚本?待整理
- mybatis中出现There is no getter for property named 'depIds' in 'class java.lang.String'的错误
- 如何在thinkphp使用xunsearch
- LS文法生成Hilbert-Peano曲线
- Jenkins部署:The username and password you provided are not correct (error 401)
- java基础巩固(1)
- PhotonServer游戏服务器端(一)
- 数据库错误代码大全
- Linux ssh免密码登录
- Vue开发环境下调用接口跨域问题
- LNAMP环境的搭建
- Java生成二维码
- Sql Server的登陆方式