GitHubコマンドでは
ssh -T [email protected]
Hi (MyName)! You've successfully authenticated, but GitHub does not provide shell access.
GitHubとの接続は問題ありませんが、Jenkinsではこのようなエラーが発生します。
ERROR: Error cloning remote repo 'origin' : Could not clone [email protected]:Name-MysRepo/MyRepo.git
hudson.plugins.git.GitException: Could not clone [email protected]:Name-MysRepo/MyRepo.git
at org.jenkinsci.plugins.gitclient.CliGitAPIImpl.clone(CliGitAPIImpl.java:219)
at hudson.plugins.git.GitSCM$2.invoke(GitSCM.java:1001)
at hudson.plugins.git.GitSCM$2.invoke(GitSCM.java:942)
at hudson.FilePath.act(FilePath.java:904)
at hudson.FilePath.act(FilePath.java:877)
at hudson.plugins.git.GitSCM.determineRevisionToBuild(GitSCM.java:942)
at hudson.plugins.git.GitSCM.checkout(GitSCM.java:1101)
at hudson.model.AbstractProject.checkout(AbstractProject.java:1369)
at hudson.model.AbstractBuild$AbstractBuildExecution.defaultCheckout(AbstractBuild.java:676)
at jenkins.scm.SCMCheckoutStrategy.checkout(SCMCheckoutStrategy.java:88)
at hudson.model.AbstractBuild$AbstractBuildExecution.run(AbstractBuild.java:581)
at hudson.model.Run.execute(Run.java:1575)
at hudson.maven.MavenModuleSetBuild.run(MavenModuleSetBuild.java:477)
at hudson.model.ResourceController.execute(ResourceController.java:88)
at hudson.model.Executor.run(Executor.java:241)
Caused by: hudson.plugins.git.GitException: Command "git clone --progress -o origin [email protected]:Name-MysRepo/MyRepo.git /root/.jenkins/jobs/TestKRGDAOV01/workspace" returned status code 128:
stdout: Cloning into '/root/.jenkins/jobs/TestKRGDAOV01/workspace'...
stderr: Permission denied (publickey).
fatal: The remote end hung up unexpectedly
これは公開鍵の問題でしょうか?
Tomcat 7/Ubuntu 12でJenkinsを使用しています。
このエラー。
stderr:Permission denied (publickey). fatal: リモートエンドが突然ハングアップしました。 予期せず
は、Jenkinsが間違ったsshキーでgithubに接続しようとしていることを示しています。
すべきです。
1.jenkinsが実行されているユーザーを特定します(例: 'build'または 'jenkins')。
2.2. クローンを実行しようとしている jenkins ホストにログインする。つまり、ノードが実際にビルドを実行している場合、マスターにはログインしない。
3.3. githubにsshしてみてください - もし失敗したら、適切な鍵を