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

前端 未结 21 1778
栀梦
栀梦 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:18

    I had put a not encrypted password in the settings.xml .

    I tested the call with curl

    curl -u username:password http://url/artifactory/libs-snapshot-local/com/myproject/api/1.0-SNAPSHOT/api-1.0-20160128.114425-1.jar --request PUT --data target/api-1.0-SNAPSHOT.jar 
    

    and I got the error:

    {
      "errors" : [ {
        "status" : 401,
        "message" : "Artifactory configured to accept only encrypted passwords but received a clear text password."
      } ]
    }
    

    I retrieved my encrypted password clicking on my artifactory profile and unlocking it.

提交回复
热议问题