TeamCityにGit(Gitolite)リポジトリを読み取らせることができないようです...例外が発生します:
List remote refs failed: com.jcraft.jsch.JSchException: Auth fail
私が試したこと:(PuTTYを使用してOpenSSH形式にエクスポートします)
すべての秘密鍵にはパスフレーズがあり、カスタム秘密鍵設定を使用して構成します。私のフェッチURLは次のようになります:git:ssh:// user @ Host/path/to/repository
私が何をしようとも...私はいつも同じ例外を受け取ります:
jetbrains.buildServer.vcs.VcsException: List remote refs failed: com.jcraft.jsch.JSchException: Auth fail
at jetbrains.buildServer.buildTriggers.vcs.git.OperationContext.wrapException(OperationContext.Java:165)
at jetbrains.buildServer.buildTriggers.vcs.git.GitVcsSupport.getRemoteRefs(GitVcsSupport.Java:339)
at jetbrains.buildServer.buildTriggers.vcs.git.GitVcsSupport.getCurrentState(GitVcsSupport.Java:128)
at jetbrains.buildServer.buildTriggers.vcs.git.TestConnectionCommand.checkFetchConnection(TestConnectionCommand.Java:95)
at jetbrains.buildServer.buildTriggers.vcs.git.TestConnectionCommand.testConnection(TestConnectionCommand.Java:68)
at jetbrains.buildServer.buildTriggers.vcs.git.GitVcsSupport.testConnection(GitVcsSupport.Java:252)
at jetbrains.vcs.api.services.impl.TestConnectionServiceProvider$1.testConnection(TestConnectionServiceProvider.Java:1)
at jetbrains.buildServer.controllers.admin.projects.TestConnectionCommand.runTestConnection(TestConnectionCommand.Java:3)
at jetbrains.buildServer.controllers.admin.projects.TestConnectionCommand.doTestConnection(TestConnectionCommand.Java:30)
at jetbrains.buildServer.controllers.admin.projects.EditVcsRootsController.doPost(EditVcsRootsController.Java:176)
at jetbrains.buildServer.controllers.BaseFormXmlController$1.handleRequest(BaseFormXmlController.Java:53)
at jetbrains.buildServer.controllers.AjaxRequestProcessor.processRequest(AjaxRequestProcessor.Java:45)
at jetbrains.buildServer.controllers.BaseFormXmlController.doHandle(BaseFormXmlController.Java:51)
at jetbrains.buildServer.controllers.BaseController.handleRequestInternal(BaseController.Java:75)
at org.springframework.web.servlet.mvc.AbstractController.handleRequest(AbstractController.Java:153)
at org.springframework.web.servlet.mvc.SimpleControllerHandlerAdapter.handle(SimpleControllerHandlerAdapter.Java:48)
at org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.Java:790)
at org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.Java:719)
at org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.Java:644)
at org.springframework.web.servlet.FrameworkServlet.doPost(FrameworkServlet.Java:560)
at javax.servlet.http.HttpServlet.service(HttpServlet.Java:646)
at javax.servlet.http.HttpServlet.service(HttpServlet.Java:727)
at jetbrains.buildServer.maintenance.TeamCityDispatcherServlet.service(TeamCityDispatcherServlet.Java:28)
at org.Apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.Java:303)
at org.Apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.Java:208)
at org.Apache.Tomcat.websocket.server.WsFilter.doFilter(WsFilter.Java:52)
at org.Apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.Java:241)
at org.Apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.Java:208)
at jetbrains.buildServer.web.DependencyParametersCalculationContextFilter.doFilter(DependencyParametersCalculationContextFilter.Java:4)
at org.Apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.Java:241)
at org.Apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.Java:208)
at jetbrains.buildServer.web.DisableSessionIdFromUrlFilter.doFilter(DisableSessionIdFromUrlFilter.Java:4)
at org.Apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.Java:241)
at org.Apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.Java:208)
at jetbrains.buildServer.web.DiagnosticFilter.doFilter(DiagnosticFilter.Java:49)
at org.Apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.Java:241)
at org.Apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.Java:208)
at jetbrains.buildServer.web.ResponseFragmentFilter.doFilter(ResponseFragmentFilter.Java:16)
at org.Apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.Java:241)
at org.Apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.Java:208)
at org.Apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.Java:220)
at org.Apache.catalina.core.StandardContextValve.invoke(StandardContextValve.Java:122)
at org.Apache.catalina.core.StandardHostValve.invoke(StandardHostValve.Java:171)
at org.Apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.Java:103)
at org.Apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.Java:116)
at org.Apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.Java:408)
at org.Apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.Java:1070)
at org.Apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.Java:611)
at org.Apache.Tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.Java:1736)
at org.Apache.Tomcat.util.net.NioEndpoint$SocketProcessor.run(NioEndpoint.Java:1695)
at Java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.Java:1145)
at Java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.Java:615)
at org.Apache.Tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.Java:61)
at Java.lang.Thread.run(Thread.Java:744)
Caused by: org.Eclipse.jgit.errors.TransportException: git:ssh://user@Host/path/to/repository: Auth fail
at org.Eclipse.jgit.transport.JschConfigSessionFactory.getSession(JschConfigSessionFactory.Java:142)
at org.Eclipse.jgit.transport.SshTransport.getSession(SshTransport.Java:121)
at org.Eclipse.jgit.transport.TransportGitSsh$SshFetchConnection.<init>(TransportGitSsh.Java:248)
at org.Eclipse.jgit.transport.TransportGitSsh.openFetch(TransportGitSsh.Java:147)
at jetbrains.buildServer.buildTriggers.vcs.git.GitVcsSupport.getRemoteRefs(GitVcsSupport.Java:356)
at jetbrains.buildServer.buildTriggers.vcs.git.GitVcsSupport.getRemoteRefs(GitVcsSupport.Java:335)
... 52 more
Caused by: com.jcraft.jsch.JSchException: Auth fail
at com.jcraft.jsch.Session.connect(Session.Java:512)
at org.Eclipse.jgit.transport.JschConfigSessionFactory.getSession(JschConfigSessionFactory.Java:116)
... 57 more
間違ったパスまたはパスフレーズが定義されていると、他の例外が発生します
SourceTree、git-cola、PuTTYなどは正常に動作しています...
私はTeamCityをStash/BitBucketとユーザー名/パスワードで使用することに慣れています。これは常に機能しているように見えましたが、Gitoliteではユーザー名/パスワードを使用できません。 :(
UnfuddlegitをVCSルートとして使用しようとしたときに同じ問題が発生しました。実際に修正するために、VCSルート認証設定のユーザー名をgit
に変更することを指定したリンク ここ を見つけました。