upgrade from 5.x to 6 broke git vcses
Hi, we had working vcses before we upgraded, and then they all broke saying:
jetbrains.buildServer.vcs.VcsException: 'git fetch' command failed.
stderr: Exception in thread "main" jetbrains.buildServer.vcs.VcsException: Cannot access repository
This error doesn't give me much to go on..
from TeamCity/log/teamcity-vcs.log:
[2011-04-07 18:33:34,345] WARN [on=editVcsRoot ] - jetbrains.buildServer.VCS - Error occurred in test connection
jetbrains.buildServer.vcs.VcsException: Cannot access repository teamcity@172.23.0.1:/opt/gitrepos/dev/skep
at jetbrains.buildServer.buildTriggers.vcs.git.GitVcsSupport.checkUrl(GitVcsSupport.java:1448)
at jetbrains.buildServer.buildTriggers.vcs.git.GitVcsSupport.openTransport(GitVcsSupport.java:1415)
at jetbrains.buildServer.buildTriggers.vcs.git.GitVcsSupport.testConnection(GitVcsSupport.java:1229)
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:636)
Any help you can provide would be greatly apreciated.
Please sign in to leave a comment.
Hi Joren,
it seems that '/' after ':' is redundant, scp-like syntax accepts relative paths, so your url should be "teamcity@172.23.0.1:opt/gitrepos/dev/skep".
Thanks for your reply. Unfortunently, taking out the / results in the error:
Connection test failed: com.jcraft.jsch.JSchException: java.lang.NullPointerException
The url I'm using works fine from the command line. Do I just need to be really carefull about the syntax I use or something?
Edit: I realize now that by relitive you might be thinking my repo is in /home/teamcity? /opt/ is in the root of the filesystem; by not specifying the /, I think I'd be pointing to /home/teamcity/opt/git-repos.
-Joren
NullPointerException is a definitely a bug, I will create an issue for that and scp-like syntax is also seems to be broken, I'll investigate that.
As a workaround please try an url ssh://teamcity@172.23.0.1/opt/gitrepos/dev/skep, it should work.
an issue for NPE http://youtrack.jetbrains.net/issue/TW-16105, issue for urls: http://youtrack.jetbrains.net/issue/TW-16106
Something seems wrong with the way teamcity is trying to format the url:
ssh://lukeme@172.23.0.1:/opt/gitrepos/dev/skep gives me:
Cannot access repository ssh:///lukeme@172.23.0.1:/opt/gitrepos/dev/skep **extra "/"
172.23.0.1:/opt/gitrepos/dev/skep with the username in the username field gives me:
Cannot access repository lukeme172.23.0.1:/opt/gitrepos/dev/skep **missing "@" symbol
ssh://lukeme@172.23.0.1/opt/gitrepos/dev/skep , without ':'
"Connection successful!" Awesome, thank you.