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

目录
相关文章
|
7月前
|
Unix 数据安全/隐私保护
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
4475 0
|
5月前
|
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
139 2
|
7月前
|
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配置文件的图片。
512 2
|
8月前
|
NoSQL Redis 数据库
解决noauth authentication required异常
解决noauth authentication required异常
472 0
解决noauth authentication required异常
|
开发工具 数据安全/隐私保护
The request you have made requires authentication. (HTTP 401)
The request you have made requires authentication. (HTTP 401)
1423 0
The request you have made requires authentication. (HTTP 401)
|
开发工具 数据安全/隐私保护 git
Authentication failed for 错误
Authentication failed for 错误
260 0
|
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指定的数据库时会报出上面的错误。 ##### 尝试 尝试使用下面的命令执行
821 0
|
存储 NoSQL Redis
docker: denied: requested access to the resource is deniedunauthorized: authentication required
docker: denied: requested access to the resource is deniedunauthorized: authentication required
723 0
docker: denied: requested access to the resource is deniedunauthorized: authentication required