karthick
karthick

Reputation: 12176

Maven release plugin git push not working with Git Deploy key

I have a very weird problem in our Jenkins setup with GIT after moving to deploy keys.

I have configured Jenkins added the private key and then added the deploy key in github, and have given write access to it.

When the task runs Jenkins is able to fetch the repository and then the maven build is carried out which completes without any issues.

enter image description here

But during the maven release phase the git push command fails with an error saying the repository is not found

enter image description here

Any Idea what I am missing ? . I tried going through different resources but none seems to work.

Additional Info: the project is a private repo. The tasks were working fine when we had a machine user. But due to some changes in our organization policies we have to move to sso on git and hence our team had to move to deploykeys

Upvotes: 3

Views: 707

Answers (1)

karthick
karthick

Reputation: 12176

If anyone having similar kind of issues. We were able to fix it.

A brave soul from our IT team was able to figure out the issue and provide a solution. The issue happened because the internal ssh used in Jekins wasn't recognizing the key that we are using.

So we installed a plugin(ssh agent) which can be configured with the git deploy keys. After doing that our Git push was successful.

Plugin info http://wiki.jenkins-ci.org/display/JENKINS/SSH+Agent+Plugin

Upvotes: 3

Related Questions