0

I have settings.xml with the below section.

<server>
   <id>github</id>
   <username>services</username>
   <password>${token}</password>
</server>

In my github workflow, I run the bash command as mvn -B -X clean release:perform --file pom.xml -s ~/.m2/settings.xml -Dtoken=${{secrets.SVC_PAT}}

I have a secret named SVC_PAT setup on the org level with the value as PAT for the service account in github. The service account has Admin permissions on the repository.

When I run the pipeline, I get below.

Error:  Failed to execute goal org.apache.maven.plugins:maven-release-plugin:3.1.0:perform (default-cli) on project XXXXXXXXXXXXXX : Unable to checkout from SCM
Error:  Provider message:
Error:  The git-clone command failed.
Error:  Command output:
Error:  Cloning into 'checkout'...
Error:  fatal: could not read Password for 'https:********@github.com': No such device or address

1 Answer 1

0

The <servers> section in settings.xml is for artifact repositories declared in the POM's <repositories> and <distributionManagement>.

I think you have to use the password parameter of release:perform like mvn ... release:perform ... -Dpassword=${{secrets.SVC_PAT}} instead.

Not the answer you're looking for? Browse other questions tagged or ask your own question.