I am using Quickbuild as my CI. When using Maven's release management plugin and running the release:prepare
command, I am getting an error committing the tag to my Git repository. This is most likely because of a permissions error.
I've read solutions to use maven options -Dusername=<username> -Dpassword=<password
but given that multiple users can see this configuration, I'd prefer to hide or encrypt the credentials.
I haven't found anything online and was wondering if someone has come across this.
Maven has a built in tool for encrypting passwords for use in your settings.xml. One thing you could try is to add the Git repository to the server tag in your settings file.
So, for example, in the settings.xml file you could add:
To encrypt your password in Maven, open the command line and use:
mvn --encrypt-password yourPasswordHere
Copy what it returns and paste it into the settings.xml.