How to specify an SSH key for Hudson with git plugin?

Posted by jlpp on Server Fault See other posts from Server Fault or by jlpp
Published on 2010-03-11T18:16:57Z Indexed on 2010/03/11 18:19 UTC
Read the original article Hit count: 255

Filed under:
|
|

I've got Hudson (continuous integration system) with the git plugin running on a Tomcat Windows Service. msysgit is installed and the msysgit bin dir is in the path. PuTTY/Pageant/plink are installed and msysgit is configured to use them.

The trouble I'm running in to, I think, is that the user who owns the Tomcat/Hudson service (Local System) has no SSH key set up to be able to clone the git repository. When the git Hudson plugin tries to clone it gives the error:

$ git clone -o origin git@hostname:project.git "e:\HUDSON_HOME\jobs\Project Trunk\workspace"
ERROR: Error cloning remote repo 'origin' : Could not clone git@hostname:project.git
ERROR: Cause: Error performing git clone -o origin git@hostname:project.git e:\HUDSON_HOME\jobs\Project Trunk\workspace
Trying next repository
ERROR: Could not clone from a repository
FATAL: Could not clone
hudson.plugins.git.GitException: Could not clone

My question is, how can I set things up so that the git plugin/msysgit know to use a particular SSH private key when trying to clone? I don't think Pageant will work because the Tomcat service is running as the "Local System" user, but I may be wrong.

© Server Fault or respective owner

Related posts about hudson

Related posts about git