No se puede acceder a repositorys git privados usando Hudson

Estoy obteniendo el siguiente error:

Started by user anonymous Checkout:workspace / /var/lib/hudson/jobs/test2/workspace - hudson.remoting.LocalChannel@1e77243d Using strategy: Default Checkout:workspace / /var/lib/hudson/jobs/test2/workspace - hudson.remoting.LocalChannel@1e77243d Cloning the remote Git repository Cloning repository origin ERROR: Error cloning remote repo 'origin' : Could not clone git@github.com:rampelli/test.git ERROR: Cause: Exception caught during execution of fetch command 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:913) at hudson.plugins.git.GitSCM$3.invoke(GitSCM.java:845) at hudson.FilePath.act(FilePath.java:758) at hudson.FilePath.act(FilePath.java:740) at hudson.plugins.git.GitSCM.gerRevisionToBuild(GitSCM.java:845) at hudson.plugins.git.GitSCM.checkout(GitSCM.java:622) at hudson.model.AbstractProject.checkout(AbstractProject.java:1479) at hudson.model.AbstractBuild$AbstractRunner.checkout(AbstractBuild.java:507) at hudson.model.AbstractBuild$AbstractRunner.run(AbstractBuild.java:424) at hudson.model.Run.run(Run.java:1366) at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:46) at hudson.model.ResourceController.execute(ResourceController.java:88) at hudson.model.Executor.run(Executor.java:145) 

Sin generar el ssh-keygen pude acceder a los repositorys de git públicos, pero después de agregar ssh-keygen no pude acceder a repositorys privados de git.

Se soluciona con solo mover la carpeta .ssh a / var / lib / hudson / folder y darle acceso a hudson a los files .ssh por solo chown hudson: hudson .ssh / * Funcionó 🙂