maven - JFrog Artifactory doesn't request user/password when deploying -
we have setup artifactory using google cloud click deploy.
i have added settings.xml file:
<servers> <server> <username>deployer</username> <password>hello</password> <id>company-central</id> </server> </servers>
i have added following pom.xml:
<distributionmanagement> <repository> <id>company-central</id> <name>company-central</name> <url>http://oururl/artifactory/libs-release-local</url> </repository> </distributionmanagement>
when run mvn deploy following error:
[error] failed execute goal org.apache.maven.plugins:maven-deploy-plugin:2.7:deploy (default-deploy) on project auth0test: failed deploy artifacts: ... return code is: 401, reasonphrase: unauthorized. -> [help 1]
looking @ artifactory logs, request coming in anonymous:
2016-11-08 11:40:49,035 [denied deploy] libs-release-local:/auth0test-1.0.jar anonymous/.
there no subsequent request authenticate 'deployer' user. artifactory has anonymous access disabled , anonymous user has had permissions removed.
when forcing credentials command line, works:
mvn deploy:deploy-file -durl=http://deployer:hello@oururl/artifactory/libs-release-local -dpomfile=pom.xml -drepositoryid=company-central -dfile=target/auth0test-1.0.jar
is error artifactory or maven?
thanks
maven's first request indeed anonymous, common practice done security reasons - not disclosing credentials server if not needed to.
@ point artifactory identifies anonymous request , there insufficient permissions , therefor returns 401 status.
when receiving 401, maven should respond challenge , resend request proper credentials. step assume not working properly.
running maven debug information might reveal more details.
Comments
Post a Comment