Could not transfer artifact from/to Authentication failed for 401 Unauthorized

简介: 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>

image.gif

注意: server的id要和mirror中的id对应。

目录
相关文章
|
6月前
|
Unix 数据安全/隐私保护
|
3月前
|
网络安全
出现“Host key verification failed”错误--解决
遇到“Host key verification failed”错误,通常是因为远程主机密钥发生变化,与本地保存的信息不符。这种情况可能是远程主机系统更改或重装等原因导致的。解决方法是根据提示使用`ssh-keygen -f "/root/.ssh/known_hosts" -R "[10.61.0.152]:29022"`命令移除旧的密钥信息,然后重新尝试连接。
744 5
remote: HTTP Basic: Access denied. The provided password or token is incorrect or your account has 2
remote: HTTP Basic: Access denied. The provided password or token is incorrect or your account has 2
4447 0
|
4月前
|
Web App开发 Java 网络安全
PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target
PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target
769 0
|
6月前
svn: E175002: Commit failed (details follow): svn: E175002: Unexpected HTTP status 502Bad Gateway on
svn: E175002: Commit failed (details follow): svn: E175002: Unexpected HTTP status 502Bad Gateway on
169 1
|
6月前
|
Kubernetes 容器 Perl
k8s部署seata 报错 没有提供足够的身份验证信息 [ http-nio-7091-exec-2] [ty.JwtAuthenticationEntryPoint] [ commence] [] : Responding with unauthorized error. Message - Full authentication is required to access this resource
Kubernetes pod 在16:12时出现两次错误,错误信息显示需要完整认证才能访问资源。尽管有此错误,但页面可正常访问。附有yaml配置文件的图片。
493 2
|
6月前
ZLMediakit-method ANNOUNCE failed: 401 Unauthorized
ZLMediakit-method ANNOUNCE failed: 401 Unauthorized
155 0
|
7月前
|
NoSQL Redis 数据库
解决noauth authentication required异常
解决noauth authentication required异常
450 0
解决noauth authentication required异常
|
数据安全/隐私保护
“Authentication is required”
“Authentication is required”
2112 2
|
开发工具 数据安全/隐私保护
The request you have made requires authentication. (HTTP 401)
The request you have made requires authentication. (HTTP 401)
1410 0
The request you have made requires authentication. (HTTP 401)