Невозможно получить доступ к частным репозиториям Git, используя Hudson - PullRequest
1 голос
/ 12 января 2012

Я получаю следующее сообщение об ошибке:

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)

Без генерации ssh-keygen я смог получить доступ к общедоступным репозиториям git, но после добавления ssh-keygen я не смог получить доступ к частным репозиториям git.

1 Ответ

1 голос
/ 16 января 2012

Это исправить, просто переместив папку .ssh в папку / var / lib / hudson / и предоставив hudson доступ к файлам .ssh просто с помощью chown hudson: hudson .ssh / * Работало :)

Добро пожаловать на сайт PullRequest, где вы можете задавать вопросы и получать ответы от других членов сообщества.
...