Clone to TFS 2012 repo fails; "Could not find a valid TFS Collection at http://ourserver:8080/tfs"

Feb 5, 2013 at 9:06 AM
Hi everyone!

When I try to clone a repo from our TFS server with a url like this "http://ourserver_8080/tfs $/SomeTeam/Repo" it fails giving me this message "Could not find a valid TFS Collection at http://ourserver:8080/tfs".

From what I gather (from the logs, se below) i seems like a webservice is not responding (or is not installed/setup correctly).

Any pointers on how to fix this would be greatly appreciated!

When I look in the log files i get this:

2013-02-04 16:10:53,956 INFO [main] (com.microsoft.tfs.jni.loader.NativeLoader) Loaded c:\git-tf-2.0.1.20130107\native\win32\x86\native_auth.dll from user-specified directory
2013-02-04 16:10:54,041 INFO [main] (com.microsoft.tfs.core.config.httpclient.DefaultHTTPClientFactory) HttpClient configured for http://ourserver:8080/tfs, authenticating as logged in user 2013-02-04 16:10:54,290 WARN [main] (com.microsoft.tfs.core.TFSTeamProjectCollection) Error getting data provider
com.microsoft.tfs.core.exceptions.TECoreException: The SOAP endpoint http://ourserver:8080/tfs/Services/v1.0/Registration.asmx could not be contacted. HTTP status: 404
at com.microsoft.tfs.core.exceptions.mappers.TECoreExceptionMapper.map(TECoreExceptionMapper.java:99)
at com.microsoft.tfs.core.exceptions.mappers.RegistrationExceptionMapper.map(RegistrationExceptionMapper.java:23)
at com.microsoft.tfs.core.clients.registration.RegistrationData.newFromServer(RegistrationData.java:70)
at com.microsoft.tfs.core.clients.registration.RegistrationClient.getRegistrationData(RegistrationClient.java:645)
at com.microsoft.tfs.core.clients.registration.RegistrationClient.getRegistrationEntries(RegistrationClient.java:151)
at com.microsoft.tfs.core.clients.registration.RegistrationClient.getRegistrationEntries(RegistrationClient.java:135)
at com.microsoft.tfs.core.PreFrameworkServerDataProvider.findServiceLocation(PreFrameworkServerDataProvider.java:289)
at com.microsoft.tfs.core.PreFrameworkServerDataProvider.locationForCurrentConnection(PreFrameworkServerDataProvider.java:264)
at com.microsoft.tfs.core.TFSTeamProjectCollection.getServerDataProvider(TFSTeamProjectCollection.java:169)
at com.microsoft.tfs.core.TFSConnection.ensureAuthenticated(TFSConnection.java:739)
at com.microsoft.gittf.client.clc.commands.framework.Command.getConnection(Command.java:354)
at com.microsoft.gittf.client.clc.commands.CloneCommand.run(CloneCommand.java:198)
at com.microsoft.gittf.client.clc.Main.main(Main.java:328)
Caused by: com.microsoft.tfs.core.ws.runtime.exceptions.EndpointNotFoundException: The SOAP endpoint http://ourserver:8080/tfs/Services/v1.0/Registration.asmx could not be contacted. HTTP status: 404
at com.microsoft.tfs.core.ws.runtime.client.SOAPService.executeSOAPRequestInternal(SOAPService.java:738)
at com.microsoft.tfs.core.ws.runtime.client.SOAPService.executeSOAPRequest(SOAPService.java:473)
at ms.tfs.services.registration._03._RegistrationSoap12Service.getRegistrationEntries(_RegistrationSoap12Service.java:105)
at com.microsoft.tfs.core.clients.registration.RegistrationData.newFromServer(RegistrationData.java:65)
... 10 more
2013-02-04 16:10:54,292 WARN [main] (git-tf) Error executing command: clone --verbose http://ourserver:8080/tfs $/DevelopmentTeam java.lang.Exception: Could not find a valid TFS Collection at http://ourserver:8080/tfs
at com.microsoft.gittf.client.clc.commands.framework.Command.getConnection(Command.java:361)
at com.microsoft.gittf.client.clc.commands.CloneCommand.run(CloneCommand.java:198)
at com.microsoft.gittf.client.clc.Main.main(Main.java:328)
Caused by: com.microsoft.tfs.core.exceptions.TECoreException: The SOAP endpoint http://ourserver:8080/tfs/Services/v1.0/Registration.asmx could not be contacted. HTTP status: 404
at com.microsoft.tfs.core.exceptions.mappers.TECoreExceptionMapper.map(TECoreExceptionMapper.java:99)
at com.microsoft.tfs.core.exceptions.mappers.RegistrationExceptionMapper.map(RegistrationExceptionMapper.java:23)
at com.microsoft.tfs.core.clients.registration.RegistrationData.newFromServer(RegistrationData.java:70)
at com.microsoft.tfs.core.clients.registration.RegistrationClient.getRegistrationData(RegistrationClient.java:645)
at com.microsoft.tfs.core.clients.registration.RegistrationClient.getRegistrationEntries(RegistrationClient.java:151)
at com.microsoft.tfs.core.clients.registration.RegistrationClient.getRegistrationEntries(RegistrationClient.java:135)
at com.microsoft.tfs.core.PreFrameworkServerDataProvider.findServiceLocation(PreFrameworkServerDataProvider.java:289)
at com.microsoft.tfs.core.PreFrameworkServerDataProvider.locationForCurrentConnection(PreFrameworkServerDataProvider.java:264)
at com.microsoft.tfs.core.TFSTeamProjectCollection.getServerDataProvider(TFSTeamProjectCollection.java:169)
at com.microsoft.tfs.core.TFSConnection.ensureAuthenticated(TFSConnection.java:739)
at com.microsoft.gittf.client.clc.commands.framework.Command.getConnection(Command.java:354)
... 2 more
Caused by: com.microsoft.tfs.core.ws.runtime.exceptions.EndpointNotFoundException: The SOAP endpoint http://ourserver:8080/tfs/Services/v1.0/Registration.asmx could not be contacted. HTTP status: 404
at com.microsoft.tfs.core.ws.runtime.client.SOAPService.executeSOAPRequestInternal(SOAPService.java:738)
at com.microsoft.tfs.core.ws.runtime.client.SOAPService.executeSOAPRequest(SOAPService.java:473)
at ms.tfs.services.registration._03._RegistrationSoap12Service.getRegistrationEntries(_RegistrationSoap12Service.java:105)
at com.microsoft.tfs.core.clients.registration.RegistrationData.newFromServer(RegistrationData.java:65)
... 10 more
Developer
Feb 5, 2013 at 1:45 PM
Hi,

In the git tf clone command you should specify a Team Project Collection, but not the Team Foundation Server URL. In your case, I guess it must be:
git tf clone http://ourserver:8080/tfs/DefaultCollection $/SomeTeam/Repo
where DefaultCollection is the Team Project Collection name

Alex
Developer
Feb 5, 2013 at 3:14 PM
Hello,

Alex is correct, you need to specify the collection in the URL. That said, if you are connecting to either the hosted server or the default collection you should not need to specify the collection. Let us know if you are seeing this issue against a default collection since this will probably be a bug.

Thanks,
Youhana
Feb 5, 2013 at 3:53 PM
Hi again!

@arukin
Thank you, your answer helped me!
I did have to specify the collection (in our case "CompanyNameDevelopmentCollection") like so :
"git tf clone http://ourserver:8080/tfs/CompanyNameDevelopmentCollection $/TeamProjectA/Main" Unlike what is stated in the Example Usage at http://gittf.codeplex.com/ i.e. "git tf clone http://myserver:8080/tfs $/TeamProjectA/Main".

@youhanaNaseim
Since our collection is not named DefaultCollection it might not be a bug? However perhaps one could mend the example text at http://gittf.codeplex.com/ to help future users?

Best regards!
Developer
Feb 5, 2013 at 4:21 PM
Hi,

@rowap
I've fixed the Example Usage. Thanks!

@youhanaNaseim
We replace the URI scheme with "https" and add the "DefaultCollection" path (if missing) only for the hosted server. We don't change URIs for on-premises TFS. And this looks reasonable for me. While currently the hosted TFS service supports only one collection per account (DefaultCollection), on-premises servers show much wider variety of collection names.

Alex
Apr 22, 2015 at 8:06 PM
Should these commands work on TFS 2015 CTP?
Developer
Apr 23, 2015 at 7:58 PM
Hi,

I believe they should.

Alex
Apr 23, 2015 at 8:02 PM
Ok thanks for the reply Alex. When I execute the command for the checkin, I get the following error:

Connecting to TFS...
Checking in to $/git-svn: 0%
git-tf: Could not lock $/git-svn

Is this a problem with my local git repo? I did an init (git svn init http://mysvnrepo) command against my svn repo to get it into my local git, now I'm trying to get it into TFS and am stuck...any suggestions.
Developer
Apr 23, 2015 at 8:10 PM
Ho did you initialize Git-TF connection with your TFS server? How does the [git-tf "server"] section look in your .git\config
Apr 23, 2015 at 9:04 PM
[core]
repositoryformatversion = 0
filemode = false
bare = false
logallrefupdates = true
symlinks = false
ignorecase = true
hideDotFiles = dotGitOnly
autocrlf = false
[svn-remote "svn"]
noMetadata = 1
url = https://svn.ourserver.com/svn/ourrepo
fetch = :refs/remotes/git-svn
[gui]
wmstate = normal
geometry = 1140x679+75+75 438 267
[git-tf]
depth = 2147483647
file-format-version = 1
[git-tf "server"]
collection = http://mylocaltfs:8080/tfs/DefaultCollection
serverpath = $/git-svn

Does something there look wrong?
Developer
Apr 23, 2015 at 9:32 PM
Everything looks fine... Maybe there are some pending changes related to $/git-svn on the server? Or maybe the project root is already locked? Or you do not have enough permissions? You could check all that with VS Source Control Explorer.

Could you try (if that's acceptable for you) and check-in not to the root of the project, but to some new empty folder? If you change in the config file the TFS server path from $/git-svn to $/git-svn/some-unique-folder-name and repeat check-in command, Git-TF should create this new folder for you.
Apr 24, 2015 at 2:48 PM
I still get the git-tf: Could not lock $/git-svn/my-unique-folder-name...I'll look to see if there's something going on with my subversion/git link.