Gradle release "net.researchgate.release 2.6.0" with Jenkins

Hi All,

I’m using the “net.researchgate.release 2.6.0” plugin to do a release build with Gradle 4.5.
I can execute the release task successfully from my local and its able to build and publish the release artifacts. But when I execute the same release task from a Jenkins job, if fails with this. It seems like its running the checkUpdateNeeded in a loop.
I have this in the release method:
elease {
revertOnFail = true
failOnUpdateNeeded = false
failOnCommitNeeded = false
failOnUnversionedFiles = false
git { requireBranch = “${project.gitBranch}”
pushToRemote = ‘origin’
pushToBranchPrefix = ‘’
commitVersionFileOnly = true
// signTag = false
}
}
afterReleaseBuild.dependsOn ‘publish’

:checkCommitNeeded (Thread[Daemon worker,5,main]) completed. Took 0.464 secs.
:checkUpdateNeeded (Thread[Daemon worker,5,main]) started.
:cat:checkUpdateNeeded
Task ‘:cat:checkUpdateNeeded’ is not up-to-date because:
Task has not declared any outputs.
Running [git, remote, update] in [/shared/jenkins/jobs/CAT_scg-cat-mmsm_cat-RELEASE-BUILD/workspace]
Running [git, remote, update] produced output: [Fetching origin]
Running [git, remote, update] produced an error: [Permission denied, please try again.
Permission denied, please try again.
Permission denied (publickey,password).
fatal: Could not read from remote repository.

Please make sure you have the correct access rights
and the repository exists.
error: Could not fetch origin]
:cat:checkUpdateNeeded FAILED
:checkUpdateNeeded (Thread[Daemon worker,5,main]) completed. Took 0.395 secs.
:release FAILED
Release process failed, reverting back any changes made by Release Plugin.
Running [git, checkout, gradle.properties] in [/shared/jenkins/jobs/CAT_scg-cat-mmsm_cat-RELEASE-BUILD/workspace]
Running [git, checkout, gradle.properties] produced output:
:release (Thread[Daemon worker,5,main]) completed. Took 1.607 secs.

FAILURE: Build failed with an exception.

  • What went wrong:
    Execution failed for task ‘:cat:checkUpdateNeeded’.

Failed to run [git remote update] - [Fetching origin
][Permission denied, please try again.
Permission denied, please try again.
Permission denied (publickey,password).
fatal: Could not read from remote repository.

Please make sure you have the correct access rights
and the repository exists.
error: Could not fetch origin
]

Any help is really appreciated, we are using the collabnet teamforge product for Jenkins.