User Tools

Site Tools


maven:encrypt-password

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

maven:encrypt-password [2019/01/06 13:16] (current)
odefta created
Line 1: Line 1:
 +====== Specify password in settings.xml ======
 +
 +To connect / deploy to a maven repository that requires a password:
 +  ​
 +Create a master password in settings-security.xml file. Place this file in ~/.m2 folder.
 +To create the password:
 +  mvn -emp mypassword
 +
 +It will print:
 +{rsB56BJcqoEHZqEZ0R1VR4TIspmODx1Ln8/​PVvsgaGw=}
 +
 +~/​.m2/​settings-security.xml file content:
 +
 +  <​settingsSecurity>​
 +    <​master>​{rsB56BJcqoEHZqEZ0R1VR4TIspmODx1Ln8/​PVvsgaGw=}</​master>​
 +  </​settingsSecurity>​
 +
 +Now, to encrypt a password using the master password:
 +
 +  mvn -ep qualityFIRST
 +
 +{uMrbEOEf/​VQHnc0W2X49Qab75j9LSTwiM3mg2LCrOzI=}
 +
 +Next, add this password to maven settings.xml file:
 +
 +  <​servers>​
 +    <​server>​
 +      <​id>​internal</​id>​
 +      <​username>​user</​username>​
 +      <​password>​{uMrbEOEf/​VQHnc0W2X49Qab75j9LSTwiM3mg2LCrOzI=}</​password>​
 +    </​server>​
 +  </​servers>​
 +
 +  ​
  
maven/encrypt-password.txt ยท Last modified: 2019/01/06 13:16 by odefta