账号密码登录
微信安全登录
微信扫描二维码登录

登录后绑定QQ、微信即可实现信息互通

手机验证码登录
找回密码返回
邮箱找回 手机找回
注册账号返回
其他登录方式
分享
  • 收藏
    X
    搭建nexus时, 始终报 Return code is: 401, ReasonPhrase: Unauthorized.
    86
    0

    setting.xml 配置了 用户名密码, pom.xml 中也对应配置了. 始终报:

    [ERROR] Failed to execute goal org.apache.maven.plugins:maven-deploy-plugin:2.7:deploy (default-deploy) on project demo-nexus: Failed to deploy artifacts: Could not transfer artifact com.
    wtgroup.demo:demo-nexus:jar:1.0-RELEASE from/to thirdparty (http://192.168.31.88:8081/nexus/content/repositories/thirdparty/): Failed to transfer file: http://192.168.31.88:8081/nexus/con
    tent/repositories/thirdparty/com/wtgroup/demo/demo-nexus/1.0-RELEASE/demo-nexus-1.0-RELEASE.jar. Return code is: 401, ReasonPhrase: Unauthorized. -> [Help 1]
    
        <server>
          <id>thirdparty</id>
          <username>test1</username>
          <password>123</password>
        </server>
     <server>
          <id>nexus-releases</id>
          <username>test1</username>
          <password>123</password>
        </server>
        <server>
          <id>nexus-snapshots</id>
          <username>test1</username>
          <password>123</password>
        </server>
     <!-- 配置远程发布到私服,mvn deploy -->
        <distributionManagement>
            <repository>
                <id>thirdparty</id>
                <name>Nexus Snapshot Repository</name>
                <url>http://192.168.31.88:8081/nexus/content/repositories/thirdparty/</url>
            </repository>
            <!--<repository>-->
                <!--<id>nexus-snapshots</id>-->
                <!--<name>Nexus Snapshot Repository</name>-->
                <!--<url>http://192.168.31.88:8081/nexus/content/repositories/snapshots/</url>-->
            <!--</repository>-->
            <!--<repository>-->
                <!--<id>nexus-releases</id>-->
                <!--<name>Nexus Release Repository</name>-->
                <!--<url>http://192.168.31.88:8081/nexus/content/repositories/releases/</url>-->
            <!--</repository>-->
            <snapshotRepository>
                <id>nexus-snapshots</id>
                <name>Nexus Snapshot Repository</name>
                <url>http://192.168.31.88:8081/nexus/content/repositories/snapshots/</url>
            </snapshotRepository>
        </distributionManagement>
    0
    打赏
    收藏
    点击回答
    您的回答被采纳后将获得:提问者悬赏的 11 元积分
        全部回答
    • 0
    • ︶自难忘 普通会员 1楼

      401 Unauthorized错误通常是Nexus服务器无法验证你的身份。这可能是因为你试图访问的资源是出于安全考虑而限制的,或者你没有正确配置你的权限。

      以下是一些可能的解决方案:

      1. 确保你已经登录到Nexus服务器。你可以在Nexus服务器的管理界面中查看你的登录信息。

      2. 检查你的身份验证配置。在Nexus服务器的管理界面中,你可以找到身份验证设置。确保你的用户名和密码是正确的,并且没有在尝试访问的资源上进行限制。

      3. 检查你的权限。确保你有足够的权限来访问你需要的资源。如果你没有,你可能需要联系你的管理员或者访问权限设置的团队来获取更多的权限。

      4. 如果以上方法都无法解决问题,你可能需要联系Nexus的客服,他们可以提供更专业的帮助。

    更多回答
    扫一扫访问手机版
    • 回到顶部
    • 回到顶部