Maven-release-plugin does not use ssh key specified in job config or / and .ssh / config
I have a jenkins job that has a git repository, as scm and jenkins connect to the latter via ssh.
Everything is fine when it comes to the clone command, I have set the correct key in .ssh / config and it is used by Jenkins.
but when it comes to doing maven release with maven-release-plugin (tested version 2.3.2 and 2.5.1) it doesn't work with Access denied.
[INFO] Executing: /bin/sh -c cd /path/slave/workspace/foo-27 && git push ssh://git@git.url/mfx/project.git refs/heads/develop-27:refs/heads/develop-27
[INFO] Working directory: /path/slave/workspace/foo-27
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 46.447s
[INFO] Finished at: Fri Oct 10 20:00:06 GMT 2014
[INFO] Final Memory: 15M/222M
[INFO] ------------------------------------------------------------------------
[JENKINS] Archiving /path/slave/workspace/foo-27/pom.xml to /bld/shared/jenkins/jobs/foo-27/modules/bar$project/builds/2014-10-10_19-59-14/archive/bar/project/27.1.1.0-SNAPSHOT/project-27.1.1.0-SNAPSHOT.pom
Waiting for Jenkins to finish collecting data
mavenExecutionResult exceptions not empty
message : Failed to execute goal org.apache.maven.plugins:maven-release-plugin:2.5.1:prepare (default-cli) on project project: Unable to commit files
Provider message:
The git-push command failed.
Command output:
Access denied.
fatal: Could not read from remote repository.
When I run the same git push from the same server in the same directory as pwd, the command works fine.
Also, in my job definition, I use credentials that set the key for the git user.
I am under the impression that the maven-release-plugin does not use the ssh key defined in .ssh / config ...
What do I need to change or do to make it work?
+3
source to share