解决maven deploy时报401 ReasonPhrase: Unauthorized 错误
来源:互联网 发布:怎么看淘宝衣服的质量 编辑:程序博客网 时间:2024/05/22 18:23
详细报错信息:
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-deploy-plugin:2.7:deploy (default-deploy) on project duy-user: Failed to deploy artifacts: Could not transfer artifact com.dopp.voor:duy-user:pom:1.31.0-20170620.020558-8 from/to snapshots (http://dev-mvn.***.com/content/repositories/snapshots/): Failed to transfer file: http://dev-mvn.***.com/content/repositories/snapshots/com/dopp/voor/duy-user/1.31.0-SNAPSHOT/duy-user-1.31.0-20170620.020558-8.pom. Return code is: 401, ReasonPhrase: Unauthorized. -> [Help 1]
[ERROR][ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR]
[ERROR] For more information about the errors and possible solutions, please read the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MojoExecutionException
关键错误信息1: Failed to deploy artifacts
关键错误信息2: Could not transfer artifact com.*:*:pom:* from/to snapshots (http://dev-mvn.***.com/content/repositories/snapshots/)
关键错误信息3: Return code is: 401, ReasonPhrase: Unauthorized. -> [Help 1]
提取关键错误信息:Could not transfer …… from/to snapshots …… Return code is: 401, ReasonPhrase: Unauthorized.
很明显了,deploy的时候,权限不够大。于是排查maven setting配置文件,最终在<servers>……</servers>配置节点中增加如下配置,问题解决:
解决问题:
<server>
<id>snapshots</id>
<username>deployment</username>
<password>l****11</password>
</server>
参考信息:
<!--配置服务端的一些设置。一些设置如安全证书不应该和pom.xml一起分发。这种类型的信息应该存在于构建服务器上的settings.xml文件中。--> <servers> <!--服务器元素包含配置服务器时需要的信息 --> <server> <!--这是server的id(注意不是用户登陆的id),该id与distributionManagement中repository元素的id相匹配。--> <id>snapshots</id> <!--鉴权用户名。鉴权用户名和鉴权密码表示服务器认证所需要的登录名和密码。 --> <username>my_login</username> <!--鉴权密码 。鉴权用户名和鉴权密码表示服务器认证所需要的登录名和密码。密码加密功能已被添加到2.1.0 +。详情请访问密码加密页面--> <password>my_password</password> <!--鉴权时使用的私钥位置。和前两个元素类似,私钥位置和私钥密码指定了一个私钥的路径(默认是${user.home}/.ssh/id_dsa)以及如果需要的话,一个密语。将来passphrase和password元素可能会被提取到外部,但目前它们必须在settings.xml文件以纯文本的形式声明。 --> <privateKey>${usr.home}/.ssh/id_dsa</privateKey> <!--鉴权时使用的私钥密码。--> <passphrase>some_passphrase</passphrase> <!--文件被创建时的权限。如果在部署的时候会创建一个仓库文件或者目录,这时候就可以使用权限(permission)。这两个元素合法的值是一个三位数字,其对应了unix文件系统的权限,如664,或者775。 --> <filePermissions>664</filePermissions> <!--目录被创建时的权限。 --> <directoryPermissions>775</directoryPermissions> </server> </servers>
<!--服务器元素包含配置服务器时需要的信息 -->
<server>
<!--这是server的id(注意不是用户登陆的id),该id与distributionManagement中repository元素的id相匹配。-->
<id>snapshots</id>
- 解决maven deploy时报401 ReasonPhrase: Unauthorized 错误
- maven deploy到nexus报错:Return code is: 401, ReasonPhrase:Unauthorized
- maven deploy到nexus报错:Return code is: 401, ReasonPhrase:Unauthorized
- maven deploy到nexus报错:Return code is: 401, ReasonPhrase:Unauthorized
- maven deploy到nexus报错:Return code is: 401, ReasonPhrase:Unauthorized
- maven deploy到nexus报错:Return code is: 401, ReasonPhrase:Unauthorized
- maven deploy到nexus报错:Return code is: 401, ReasonPhrase:Unauthorized
- maven deploy到nexus报错:Return code is: 401, ReasonPhrase:Unauthorized
- maven deploy第三方jar包到nexus, 异常Return code is: 401, ReasonPhrase: Unauthorized
- maven deploy到nexus报错:Return code is: 401, ReasonPhrase:Unauthorized
- Return code is : 401, ReasonPhrase: Unauthorized
- maven deploy 401错误
- maven release插件将一版本发布到仓库中时Return code is: 401, ReasonPhrase:Unauthorized
- maven deploy时报错
- 解决手机unauthorized错误
- Maven deploy时报Fatal error compiling: tools.jar not found错误的问题处理
- Maven deploy时报Fatal error compiling: tools.jar not found错误的问题处理
- Maven deploy时报Fatal error compiling: tools.jar not found错误的问题处理
- 使用Gradle构建构建一个Java Web工程及持续集成环境Jenkins配置
- Windows 32位/64位直接快速使用exe安装openssl
- 研究生小论文的投稿技巧(修订稿)
- [MySQL] innobackupex在线备份及恢复(全量和增量)
- 判断E盘目录下是否有后缀名为.jpg的文件,如果有,就输出该文件名称
- 解决maven deploy时报401 ReasonPhrase: Unauthorized 错误
- linux下qt程序打包中文乱码(qtInstallerFrameWork)
- Java开发中的23种设计模式详解----观察者模式(Observer)
- 正则基础之——贪婪与非贪婪模式
- Hadoop Intellij IDEA 建demo
- nginx 配置 读取本地静态文件
- 牛客网算法学习笔记-动态规划(1)
- java----异常处理
- Java虚拟机运行时数据区域