解决maven deploy时报401 ReasonPhrase: Unauthorized 错误

详细报错信息:

[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配置文件,最终在……配置节点中增加如下配置,问题解决:

解决问题:


    snapshots
    deployment
    l****11

参考信息:


 
  
  
   
   snapshots
   
   my_login
   
   my_password
   
   ${usr.home}/.ssh/id_dsa
   
   some_passphrase
   
   664
   
   775
  
 


解决这个问题最关键要明白,下面配置的作用。

 
   
   snapshots

你可能感兴趣的:(maven)