maven - Unable to deploy artifact using encrypted password with LDAP enabled -


we using artifactory version 4.7.0. have configured ldap artifactory , able login successfully. when trying use encrypted password deploying artifacts, it's not working. in artifacts tab, clicked on "set me up" , generated maven settings after entering credentials. downloaded settings.xml file had following content:

<?xml version="1.0" encoding="utf-8"?> <settings xsi:schemalocation="http://maven.apache.org/settings/1.1.0 http://maven.apache.org/xsd/settings-1.1.0.xsd" xmlns="http://maven.apache.org/settings/1.1.0"     xmlns:xsi="http://www.w3.org/2001/xmlschema-instance">   <servers>     <server>       <username>${security.getcurrentusername()}</username>       <password>${security.getescapedencryptedpassword()!"*** insert encrypted password here ***"}</password>       <id>central</id>     </server>     <server>       <username>${security.getcurrentusername()}</username>       <password>${security.getescapedencryptedpassword()!"*** insert encrypted password here ***"}</password>       <id>snapshots</id>     </server>   </servers>   <profiles>     <profile>       <repositories>         <repository>           <snapshots>             <enabled>false</enabled>           </snapshots>           <id>central</id>           <name>libs-release</name>           <url>http://artifactory:9090/libs-release</url>         </repository>         <repository>           <snapshots />           <id>snapshots</id>           <name>libs-snapshot</name>           <url>http://artifactory:9090/libs-snapshot</url>         </repository>       </repositories>       <pluginrepositories>         <pluginrepository>           <snapshots>             <enabled>false</enabled>           </snapshots>           <id>central</id>           <name>plugins-release</name>           <url>http://artifactory:9090/plugins-release</url>         </pluginrepository>         <pluginrepository>           <snapshots />           <id>snapshots</id>           <name>plugins-snapshot</name>           <url>http://artifactory:9090/plugins-snapshot</url>         </pluginrepository>       </pluginrepositories>       <id>artifactory</id>     </profile>   </profiles>   <activeprofiles>     <activeprofile>artifactory</activeprofile>   </activeprofiles> </settings> 

then went profile, entered password , copied encrypted password shown below:

enter image description here

i copied password in settings.xml shown below:

    <server>       <username>${security.getcurrentusername()}</username>       <password>${security.getescapedencryptedpassword()!"ap6fcvsvawzhcfedzb2pctrcuza"}</password>       <id>central</id>     </server>     <server>       <username>${security.getcurrentusername()}</username>         <password>${security.getescapedencryptedpassword()!"ap6fcvsvawzhcfedzb2pctrcuza"}</password>       <id>snapshots</id>     </server> 

and when tried deploying artifact, following error:

[error] failed execute goal org.apache.maven.plugins:maven-deploy-plugin:2.7:deploy (default-deploy) on project more-maven-examples: failed deploy artifac ts: not transfer artifact com.infiniteskills.maven:more-maven-examples:jar:1.0 from/to central (http://artifactory:9090/libs-release-local): failed transfer file: http://artifactory:9090/libs-release-local/com/infiniteskills/maven/more-maven-examples/1.0/more-maven-examples-1.0.jar. r eturn code is: 401, reasonphrase: unauthorized. -> [help 1] [error] [error] see full stack trace of errors, re-run maven -e switch. [error] re-run maven using -x switch enable full debug logging. 

entry in request.log file failed attempt:

20160525143037|9526|request|10.20.55.124|non_authenticated_user|put|/libs-release-local/com/infiniteskills/maven/more-maven-examples/1.0/more-maven-examples-1.0.jar|http/1.1|401|2981 20160525143037|2|request|10.20.55.124|non_authenticated_user|put|/libs-release-local/com/infiniteskills/maven/more-maven-examples/1.0/more-maven-examples-1.0.pom|http/1.1|401|1235 

in security > general > password encryption policy set supported. also, passwords encryption set encrypted.

surprisingly, when hard-code name , ldap password in settings.xml file in same <server> block, works fine.

am doing wrong or bug?

you <password/> section should like:

<password>{coqlce6du6gtcs5p=}</password> 

have @ maven encryption guide.


Comments

Popular posts from this blog

scala - 'wrong top statement declaration' when using slick in IntelliJ -

c# - DevExpress.Wpf.Grid.InfiniteGridSizeException was unhandled -

PySide and Qt Properties: Connecting signals from Python to QML -