github - Maven release issue in Jenkins -
i trying taking maven build & update release using jenkins. not able update project version , getting error. how fix ?
jenkins version : 2.7.1 war maven : 3 windows 7
<scm> <connection>scm:git:git@github.com:username/test-app.git</connection> <url>scm:git:git@github.com:username/test-app.git</url> <developerconnection>scm:git:git@github.com:username/test-app.git</developerconnection> </scm>
maven goal
-x release:clean release:prepare release:perform
<plugin> <groupid>org.apache.maven.plugins</groupid> <artifactid>maven-release-plugin</artifactid> <version>2.5.3</version> </plugin>
error
[error] failed execute goal org.apache.maven.plugins:maven-release-plugin:2.5.3:prepare (default-cli) on project test-app: unable commit files [error] provider message: [error] git-push command failed. [error] command output: [error] host key verification failed. [error] fatal: not read remote repository. [error] [error] please make sure have correct access rights [error] , repository exists. [error] [error] -> [help 1]
i see because jenkins job runs different account (or system account, on windows) account having private key.
you must make sure jenkins job (check environment variables) has %userprofile%\.ssh\id_rsa
(or $home/.ssh/id_rsa
) right private ssh key (preferably without passphrase, avoid pageant passphrase cache issue).
you can add ssh -tv git@github.com
build step, testing.
Comments
Post a Comment