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对应。

目录
相关文章
|
3月前
|
Unix 数据安全/隐私保护
|
1月前
|
JavaScript
request to https://registry.npm.taobao.org/cnpm failed, reason: certificate has expired
request to https://registry.npm.taobao.org/cnpm failed, reason: certificate has expired
43 2
|
1月前
|
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
237 0
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
4134 0
|
3月前
|
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配置文件的图片。
292 2
|
4月前
|
NoSQL Redis 数据库
解决noauth authentication required异常
解决noauth authentication required异常
298 0
解决noauth authentication required异常
|
10月前
|
负载均衡 监控 网络协议
502 Bad Gateway Registered endpoint failed to handle the request
502 Bad Gateway Registered endpoint failed to handle the request
|
10月前
|
开发工具 数据安全/隐私保护 git
Authentication failed for 错误
Authentication failed for 错误
191 0
|
开发工具 数据安全/隐私保护
The request you have made requires authentication. (HTTP 401)
The request you have made requires authentication. (HTTP 401)
1285 0
The request you have made requires authentication. (HTTP 401)
|
NoSQL 安全 MongoDB
mongorestore[报错]auth error: sasl c onversation error: unable to authenticate using mechanism
mongodb中添加了admin表的用户,即创建了超级管理员(mongodb的安全生产环境的权限设置请查看: [https://blog.csdn.net/Chenftli/article/details/105228130](https://blog.csdn.net/Chenftli/article/details/105228130)),此时我想去将备份的集合的bson文件数据导入到mongodb指定的数据库时会报出上面的错误。 ##### 尝试 尝试使用下面的命令执行
687 0