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

目录
相关文章
|
4月前
|
Unix 数据安全/隐私保护
|
2月前
|
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
52 2
|
2月前
|
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
261 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
4163 0
|
4月前
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
100 1
|
4月前
|
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配置文件的图片。
334 2
|
11月前
|
开发工具 数据安全/隐私保护 git
Authentication failed for 错误
Authentication failed for 错误
201 0
|
开发工具 数据安全/隐私保护
The request you have made requires authentication. (HTTP 401)
The request you have made requires authentication. (HTTP 401)
1294 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指定的数据库时会报出上面的错误。 ##### 尝试 尝试使用下面的命令执行
707 0
|
Web App开发 Java
利用Basic authentication 测试不同user的metadata access request
Created by Jerry Wang, last modified on Dec 26, 2014
147 0
利用Basic authentication 测试不同user的metadata access request