Teamcity 8 will not connect to TFS 2013 GIT Repository
Hi
We are trying to connect to a Team Foundation Server 2013 git repo but teamcity gives the following error.
List remote refs failed: java.net.ConnectException: Cannot determine proxy for http://domain\user@msc2k12:8080/tfs/xyz/_git/projectname/info/refs?service=git-upload-pack.
Other git tools like SourceTree seem to work just fine.
Please sign in to leave a comment.
Please watch http://youtrack.jetbrains.com/issue/TW-21747.
Which TeamCity version do you use?
I've fixed it in TeamCity 8.0.x and 8.x, please let me know if you need fix for older TeamCity version.
I'm using ver 8.0 (build 27402). Is it supposed to be fixed in this version?
Yes, please install the build snapshot-45 of git-plugin from http://teamcity.jetbrains.com/viewType.html?buildTypeId=TeamCityPluginsByJetBrains_JetBrainsGitPluginTeamCity80x&tab=buildTypeStatusDiv&branch_TeamCityPluginsByJetBrains_Git=__all_branches__ . To do that put the zip into <TEAMCITY_DATA_DIR>/plugins and restart the server. Let me know if it helps.
I've downloaded the package and it was unpacked upon a restart of teamcity but it seems TC is not using the newer plugin. It still used the previous one. Any idea on how to force TC to use the newer one?
Ok had to delete to older plugin from the Teamcity folder. Now it's seen as an external plugin.
Still getting the same error though.
Am I doing something incorrect maybe? Do you perhaps have a local instance of TFS 2013 to test the GIT functionality against it? Don't understand how SourceTree can work.
Hi,
the reason why TeamCity doesn't pick up this version of plugin is because the version of TeamCity is newer. You have TeamCity 8.0.5 which already includes the fix, which doesn't help. You can make TeamCity to pick up the plugin by changing a timestamp in teamcity-plugin.xml in the root of the zip to something like SNAPSHOT-20131115025028.
Unfortunately we don't have TFS 2013 installed. But I think the error is not specific to TFS, I've got the same error with other servers and in my case fix has helped.
Please reproduce the problem with 'debug-vcs' logging preset (in Administration > Diagnostics) and attach or send us teamcity-vcs.log from the server.
I've pasted the relevant section.
[2013-11-18 09:26:04,708] WARN [nio-8082-exec-2] - jetbrains.buildServer.VCS - Error occurred in test connection
jetbrains.buildServer.vcs.VcsException: List remote refs failed: org.eclipse.jgit.errors.TransportException: http://msc2k12.msc.local:8080/tfs/collection/_git/repo: authentication not supported
at jetbrains.buildServer.buildTriggers.vcs.git.OperationContext.wrapException(OperationContext.java:134)
at jetbrains.buildServer.buildTriggers.vcs.git.GitVcsSupport.getRemoteRefs(GitVcsSupport.java:456)
at jetbrains.buildServer.buildTriggers.vcs.git.GitVcsSupport.getCurrentState(GitVcsSupport.java:125)
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:371)
at jetbrains.vcs.api.services.impl.TestConnectionServiceProvider$1.testConnection(TestConnectionServiceProvider.java:1)
at jetbrains.buildServer.controllers.admin.projects.TestConnectionCommand.runTestConnection(TestConnectionCommand.java:9)
at jetbrains.buildServer.controllers.admin.projects.TestConnectionCommand.doTestConnection(TestConnectionCommand.java:34)
at jetbrains.buildServer.controllers.admin.projects.EditVcsRootsController.doPost(EditVcsRootsController.java:218)
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: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:647)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:728)
at jetbrains.buildServer.maintenance.TeamCityDispatcherServlet.service(TeamCityDispatcherServlet.java:17)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:305)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
at jetbrains.buildServer.web.ParametersProviderCalculationContextFilter.doFilter(ParametersProviderCalculationContextFilter.java:7)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:243)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
at jetbrains.buildServer.web.DisableSessionIdFromUrlFilter.doFilter(DisableSessionIdFromUrlFilter.java:1)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:243)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
at jetbrains.buildServer.web.DiagnosticFilter.doFilter(DiagnosticFilter.java:63)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:243)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
at jetbrains.buildServer.web.ResponseFragmentFilter.doFilter(ResponseFragmentFilter.java:3)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:243)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:222)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:123)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:171)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:99)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:118)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:407)
at org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:1004)
at org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:589)
at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.run(NioEndpoint.java:1686)
at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
at java.lang.Thread.run(Unknown Source)
Caused by: org.eclipse.jgit.errors.TransportException: http://msc2k12.msc.local:8080/tfs/collection/_git/repo: authentication not supported
at org.eclipse.jgit.transport.TransportHttp.connect(TransportHttp.java:480)
at org.eclipse.jgit.transport.TransportHttp.openFetch(TransportHttp.java:314)
at jetbrains.buildServer.buildTriggers.vcs.git.GitVcsSupport.getRemoteRefs(GitVcsSupport.java:472)
at jetbrains.buildServer.buildTriggers.vcs.git.GitVcsSupport.getRemoteRefs(GitVcsSupport.java:454)
... 47 more
I think this happens because TFS doesn't support basic or digest authentication methods supported by TeamCity. Please watch/vote for http://youtrack.jetbrains.com/issue/TW-18187, it is about adding an ntlm authentication for git VCS roots. Some users reported that they were able to connect to TFS after upgrade from TFS preview to TFS release candidate. Such an update seems to be the only workaround at the moment.
Hi
I went back into IIS and enabled basic authentication for Team Foundation Server\tfs and it works now.
Thanks for all the help.
Hello,
I am having the same issue :(. I keep getting this:
The same settings work in another git programs (on win as well as on linux).
TC 8.0.5
TFS 2013, local installation, basic & diget auth enabled.
User format: DOMAIN\USER
--- Update ---
I tried the 8.1 EAP (build 29687) and I still cannot authorize :(.
Now the message has slighly changed:
---
Thanks, Stefan
PS: Paradox: I am able to connect to visual studio online git repos. It is just local TFS install which is making trouble.
Please try disabling Digest authentication, leave just Basic. Also try using a username without domain. Let me know if it helps.
Thanks for hint. It is working now.
Did using another name or disabling the Digest authentication helped?
Hi, I need to be able to connect to Git on TFS 2013 with TeamCity Enterprise 7.1.4 (build 24331).
I would REALLY like to know what you did to get this working. I've tried enabling Basic Authentication on the 'Team Foundation Server\tfs' site, but it keep failing with a '401 unauthorized' error...
Hello, Here are my settings which are working:
IIS settings for TFS 2013:
I am using TFS 8.1 EAP.
Stefan
Stefan,
thanks for update!