Why am I getting a “401 Unauthorized” error in Maven?

前端 未结 21 1835
栀梦
栀梦 2020-11-29 18:06

Why am I getting a \"401 Unauthorized\" error in Maven?

Here\'s the error I\'m getting when calling mvn deploy (full logs at the bottom):

21条回答
  •  误落风尘
    2020-11-29 18:34

    This is the official explanation from sonatype nexus team about 401 - Unauthorized

    I recommend you to read Troubleshooting Artifact Deployment Failures for more information.

    Code 401 - Unauthorized

    Either no login credentials were sent with the request, or login credentials which are invalid were sent. Checking the "authorization and authentication" system feed in the Nexus UI can help narrow this down. If credentials were sent there will be an entry in the feed.

    If no credentials were sent this is likely due to a mis-match between the id in your pom's distributionManagement section and your settings.xml's server section that holds the login credentials.

提交回复
热议问题