Problems creating a Git/Github VCS Root

Hi,

I'm trying to setup a new TeamCity 6 instance, and I'm stuck on the VCS root setup.

My config is pretty standard: a repository hosted on an organization account with a Windows git client using ssh (private key + passphrase). I'm able to clone the repo on git bash, but I can't get a successful connection test on TeamCity.

I've even tried different configs (using username, empty username, new key, disabling firewall), but nothing seems to work.

Here is the error message:

[2010-12-20 18:22:38,964]   WARN [on=editVcsRoot ] -      jetbrains.buildServer.VCS - Error occurred in test connection
jetbrains.buildServer.vcs.VcsException: Connection test failed: com.jcraft.jsch.JSchException: Auth fail
 at jetbrains.buildServer.buildTriggers.vcs.git.GitVcsSupport.processException(GitVcsSupport.java:186)
 at jetbrains.buildServer.buildTriggers.vcs.git.GitVcsSupport.testConnection(GitVcsSupport.java:1282)




Does anyone had similar issue?

There is some sort of debug logging level for it? If yes, how do I set it?
4 comments
Comment actions Permalink

Hi Henry, sorry for delay in replying.

If a problem is still actual please activate 'debug-vcs' loggin preset at Administration > Server Configuration > Debug logging.
After that you should see more detailed error messages in teamcity-vcs.log . If cause of error wouldn't be obvious please provide related content of teamcity-vcs.log.

0
Comment actions Permalink

I too, am currently having issues getting ssh keys working with github. It works from from my (OS X) command line, but fails when I test the connection inside team city. The agent is running as the same user and on the same box as team city, I am using either defult private or or providing one and have tried with and without passphrae - nothing works.

Is there a good definitive description of how to do this? I can only find little blog posts, whose instructions I have followed and have failed to get working.

I have some log output here

[2011-04-24 12:14:03,563]   WARN [on=editVcsRoot ] -      jetbrains.buildServer.VCS - Error occurred in test connection
jetbrains.buildServer.vcs.VcsException: Connection test failed: com.jcraft.jsch.JSchException: Auth fail
 at jetbrains.buildServer.buildTriggers.vcs.git.GitVcsSupport.processException(GitVcsSupport.java:190)
 at jetbrains.buildServer.buildTriggers.vcs.git.GitVcsSupport.testConnection(GitVcsSupport.java:1290)
 at jetbrains.buildServer.controllers.admin.projects.EditVcsRootsController.doPost(EditVcsRootsController.java:19)
 at jetbrains.buildServer.controllers.BaseFormXmlController$1.handleRequest(BaseFormXmlController.java:54)
 at jetbrains.buildServer.controllers.AjaxRequestProcessor.processRequest(AjaxRequestProcessor.java:45)
 at jetbrains.buildServer.controllers.BaseFormXmlController.doHandle(BaseFormXmlController.java:52)
 at jetbrains.buildServer.controllers.BaseController.handleRequestInternal(BaseController.java:73)
 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:875)
 at org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:807)
 at org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:571)
 at org.springframework.web.servlet.FrameworkServlet.doPost(FrameworkServlet.java:511)
 at javax.servlet.http.HttpServlet.service(HttpServlet.java:637)
 at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
 at jetbrains.buildServer.rootDispatcher.TeamCityDispatcherServlet.service(TeamCityDispatcherServlet.java:222)
 at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
 at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
 at jetbrains.buildServer.web.SetThreadNameFilter.runChainWithModifiedThreadName(SetThreadNameFilter.java:18)
 at jetbrains.buildServer.web.SetThreadNameFilter.doFilter(SetThreadNameFilter.java:4)
 at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
 at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
 at jetbrains.buildServer.web.ResponseFragmentFilter.doFilter(ResponseFragmentFilter.java:2)
 at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
 at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
 at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:233)
 at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)
 at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)
 at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
 at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
 at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:298)
 at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:857)
 at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:588)
 at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:489)
 at java.lang.Thread.run(Thread.java:680)
Caused by: org.eclipse.jgit.errors.TransportException: git@github.com:piercer/remorder.git: Auth fail
 at org.eclipse.jgit.transport.SshTransport.initSession(SshTransport.java:140)
 at org.eclipse.jgit.transport.TransportGitSsh.exec(TransportGitSsh.java:150)
 at org.eclipse.jgit.transport.TransportGitSsh$SshFetchConnection.<init>(TransportGitSsh.java:247)
 at org.eclipse.jgit.transport.TransportGitSsh.openFetch(TransportGitSsh.java:100)
 at jetbrains.buildServer.buildTriggers.vcs.git.GitVcsSupport.testConnection(GitVcsSupport.java:1231)
 ... 33 more
Caused by: com.jcraft.jsch.JSchException: Auth fail
 at com.jcraft.jsch.Session.connect(Session.java:452)
 at org.eclipse.jgit.transport.SshTransport.initSession(SshTransport.java:133)
 ... 37 more


Any help would be gratefully appreciated
0
Comment actions Permalink

Hi Conrad,
do you run git in command line by the same user who runs TeamCity?

0
Comment actions Permalink

Yes, I have managed to work around it by not having a password on the id_rsa private key, but I know that GitHub do not recommend this :-(

0

Please sign in to leave a comment.