>From the maven documentation <https://maven.apache.org/settings.html#Quick_Overview> you might have to give the environment variable as "${env.GO_REPO_PASSWORD}".
On Thu, Nov 30, 2017 at 7:48 PM, ShaneG <[email protected]> wrote: > I am using GOCD Docker agents and have created my own docker agent image > based on gocd/gocd-agent-centos-7:v17.11.0, and have added Java SDK & > Maven, and a custom maven settings.xml > > I have a artifact repository that i must authenticate with so in my > settings.xml i have added the following section. > > <server> > <id>my-artifact-repo-name</id> > <username>${GO_REPO_USER}</username> > <password>${GO_REPO_PASSWORD}</password> > </server> > > From my GOCD pipeline i have added environment variables for GO_REPO_USER > and GO_REPO_PASSWORD. > > The GO_REPO_USER is always injected as expected but GOCD seems to think > the password is encrypted and is always looking for a settings-security.xml. > > I see the following error on the console > > [DEBUG] Failed to decrypt password for server my-artifact-repo-name: > org.sonatype.plexus.components.sec.dispatcher.SecDispatcherException: > java.io.FileNotFoundException: /home/go/.m2/settings-security.xml (No > such file or directory) > org.sonatype.plexus.components.sec.dispatcher.SecDispatcherException: > org.sonatype.plexus.components.sec.dispatcher.SecDispatcherException: > java.io.FileNotFoundException: /home/go/.m2/settings-security.xml (No > such file or directory) > > If i update the settings.xml with <password>my-password</password> > instead of the password i entered as environment variable then it will > authenticate fine. > > Any help appreciated > > -- > You received this message because you are subscribed to the Google Groups > "go-cd" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to [email protected]. > For more options, visit https://groups.google.com/d/optout. > -- Ashwanth Kumar / ashwanthkumar.in -- You received this message because you are subscribed to the Google Groups "go-cd" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. For more options, visit https://groups.google.com/d/optout.
