Could not transfer artifact from/to Authentication failed for 401 Unauthorized
Posted hoho_12
tags:
篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了Could not transfer artifact from/to Authentication failed for 401 Unauthorized相关的知识,希望对你有一定的参考价值。
问题:使用maven打包时报了如上的错误。
分析:公司切换了maven仓库的镜像地址,且新的仓库地址需要登录。
解决: 配置settings.xml,给相应的仓库地址配置登录名和密码。
<servers>
<server>
<id>test</id>
<username>admin</username>
<password>123</password>
</server>
</servers>
<mirrors>
<mirror>
<id>test</id>
<name>jar repository</name>
<url>http://address:ip/repository/maven-public/</url>
<mirrorOf>central</mirrorOf>
</mirror>
</mirrors>
注意: server的id要和mirror中的id对应。
以上是关于Could not transfer artifact from/to Authentication failed for 401 Unauthorized的主要内容,如果未能解决你的问题,请参考以下文章
Could not transfer artifact from/to Authentication failed for 401 Unauthorized
Spring Boot# Could not transfer artifact..maven导包问题查看和修改内置Tomcat版本自定义启动Banner
原创经验分享(10)Could not transfer artifact org.apache.maven:maven. from/to central. Received fatal aler(代
Non-resolvable parent POM for com.example:dubbo:0.0.1-SNAPSHOT: Could not transfer artifact org.spri
Could not determine the dependencies of task ‘:app:compileDebugJavaWithJavac‘ Could not resolve all
Could not determine the dependencies of task ‘:app:compileDebugJavaWithJavac‘ Could not resolve all