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.
I've tried setting Pageant up as a service (using runassvc.exe), passing the appropriate key, and having it run as "Local System". The other service doesn't seem to be able to see the key from the pageant service.