Search code examples
githudsongitosis

Hudson and gitosis


I'm trying to get Gitosis and Hudson to play nice together. I am able to pull from the repository without password access by editing ~/.ssh/authorized_keys and putting my public key in that file. However, whenever I attempt to run my Hudson project I immediately get the error listed below. Can anyone help me out?

Thanks

PS This works fine from command line

Sorry if these questions seems basic, I'm coming from a GitHub background and have never used gitosis before

Started by user anonymous
Checkout:workspace / C:\Documents and Settings\hudson\.hudson\jobs\<job>\workspace - hudson.remoting.LocalChannel@13b8b4d
Using strategy: Default
Checkout:workspace / C:\Documents and Settings\hudson\.hudson\jobs\<job>\workspace - hudson.remoting.LocalChannel@13b8b4d
Cloning the remote Git repository
Cloning repository origin
ERROR: Failed to clean the workspace
java.io.IOException: Unable to delete C:\Documents and Settings\hudson\.hudson\jobs\<job>\workspace
at hudson.Util.deleteFile(Util.java:263)
at hudson.Util.deleteRecursive(Util.java:305)
at hudson.FilePath$9.invoke(FilePath.java:826)
at hudson.FilePath$9.invoke(FilePath.java:824)
at hudson.FilePath.act(FilePath.java:758)
at hudson.FilePath.act(FilePath.java:740)
at hudson.FilePath.deleteRecursive(FilePath.java:824)
at hudson.plugins.git.GitAPI.clone(GitAPI.java:208)
at hudson.plugins.git.GitSCM$3.invoke(GitSCM.java:835)
at hudson.plugins.git.GitSCM$3.invoke(GitSCM.java:782)
at hudson.FilePath.act(FilePath.java:758)
at hudson.FilePath.act(FilePath.java:740)
at hudson.plugins.git.GitSCM.gerRevisionToBuild(GitSCM.java:782)
at hudson.plugins.git.GitSCM.checkout(GitSCM.java:568)
at hudson.model.AbstractProject.checkout(AbstractProject.java:1217)
at hudson.model.AbstractBuild$AbstractRunner.checkout(AbstractBuild.java:508)
at hudson.model.AbstractBuild$AbstractRunner.run(AbstractBuild.java:424)
at hudson.model.Run.run(Run.java:1367)
at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:46)
at hudson.model.ResourceController.execute(ResourceController.java:88)
at hudson.model.Executor.run(Executor.java:145)
ERROR: Error cloning remote repo 'origin' : Failed to delete workspace
ERROR: Cause: Unable to delete C:\Documents and Settings\hudson\.hudson\jobs\<job>\workspace
Trying next repository
ERROR: Could not clone repository
FATAL: Could not clone
hudson.plugins.git.GitException: Could not clone
at hudson.plugins.git.GitSCM$3.invoke(GitSCM.java:850)
at hudson.plugins.git.GitSCM$3.invoke(GitSCM.java:782)
at hudson.FilePath.act(FilePath.java:758)
at hudson.FilePath.act(FilePath.java:740)
at hudson.plugins.git.GitSCM.gerRevisionToBuild(GitSCM.java:782)
at hudson.plugins.git.GitSCM.checkout(GitSCM.java:568)
at hudson.model.AbstractProject.checkout(AbstractProject.java:1217)
at hudson.model.AbstractBuild$AbstractRunner.checkout(AbstractBuild.java:508)
at hudson.model.AbstractBuild$AbstractRunner.run(AbstractBuild.java:424)
at hudson.model.Run.run(Run.java:1367)
at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:46)
at hudson.model.ResourceController.execute(ResourceController.java:88)
at hudson.model.Executor.run(Executor.java:145)

Solution

  • You need to use something like Pageant to keep your key loaded. You will still need to enter your passphrase, but only once.