0

The problem is, that maven release:perform fails to git checkout the repository using the credentials from MavenAuthenticate having either ssh or https..

[INFO] --- release:3.0.1:perform (default-cli) @ APPLICATION ---
[INFO] starting perform goal, composed of 3 phases: verify-completed-prepare-phases, checkout-project-from-scm, run-perform-goals
[INFO] 1/3 perform:verify-completed-prepare-phases
[INFO] 2/3 perform:checkout-project-from-scm
[INFO] Checking out the project to perform the release ...
[INFO] Executing: /bin/sh -c cd '/azp/_work/1/s/target' && 'git' 'clone' '--depth' '1' '--branch' '1.1.1' 'https:********@dev.azure.com/APPLICATION-LOCATION-IN-REPO' 'checkout'
[INFO] Working directory: /azp/_work/1/s/target
[ERROR] The git-clone command failed.
[INFO] ------------------------------------------------------------------------
[INFO] Reactor Summary for APPLICATION 1.0.0-SNAPSHOT:

...
[ERROR] The git-clone command failed.
...
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time:  4.196 s
[INFO] Finished at: 2025-04-20T12:57:07Z
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-release-plugin:3.0.1:perform (default-cli) on project APPLICATION: 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:********@dev.azure.com': terminal prompts disabled

I have figured out how to release:prepare and git push tags using MavenAuthenticate and everything works fine until the scm's git checkout..

          ...
          - task: MavenAuthenticate@0
            displayName: 'Maven Authenticate'
            ...
          ...
          - task: Maven@4
            displayName: Release prep
            inputs:
              goals: 'release:clean release:prepare'
            ...
          - bash: |
              git push --follow-tags
            displayName: do push tags
          ...
          - task: Maven@4
            displayName: Release perf
            inputs:
              goals: 'release:perform'
            ...
          ...
2
  • MavenAuthenticate is for maven artifacts stored in maven repositories, not git. Can you provide more details about where the git repository is in relation to this pipeline? Commented Apr 20 at 20:12
  • Hey Bryan @bryanbcook, I've added that we have normally functioning git push --follow-tags in the pipeline.. But the release:perform does git clone in target/.. Commented Apr 21 at 10:54

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.