TFS Url?

740 views
Skip to first unread message

Doug .

unread,
Aug 22, 2011, 11:20:58 PM8/22/11
to git-t...@googlegroups.com
This is probably a dummy question, but I've just recently started using TFS, and I'm sort of lost as to how to determine what the correct url for a TFS repository is.

On one of our TFS repos I go:
git tfs clone http://....:8080/ "$/P3/Web Site/"

And it clones it fine.

On another, I try:
git tfs clone https://.../PulicGroup "$/Project/Trunk/Project" 

and get:
The underlying connection was closed: An unexpected error occurred on a send.
The handshake failed due to an unexpected packet format.

or, for "$/Project/Trunk/":
TF31002: Unable to connect to this Team Foundation Server: https://.../
Team Foundation Server Url: https://.../

Possible reasons for failure include:
- The name, port number, or protocol for the Team Foundation Server is incorrect.
- The Team Foundation Server is offline.
- The password has expired or is incorrect.

Technical information (for administrator):
The request failed with HTTP status 404: Not Found.
The request failed with HTTP status 404: Not Found.

These are the value I get from right-click -> properties in tfs explorer in visual studio.

How do you figure out what the correct url is for a project? 

I've tried messing around with --Username and --Password on the https server too, but no luck (obviously these details are correct, or I wouldn't be able to view the repo using visual studio).

Cheers,
Doug.

Ivan Danilov

unread,
Aug 23, 2011, 6:27:05 AM8/23/11
to git-t...@googlegroups.com
If you're using TFS2010 most probably you should use something like http://...:8080/tfs
Or, if you have several project collections even http://...:8080/tfs/ProjCollection

Alternatively, since v0.12 you can use server instance name rather than URI if server is registered in VS. So if VS shows server MyTfsServer for example, then you can use command git tfs clone MyTfsServer '$/Project/Trunk/'
To check what servers you have manually - check out registry key HKEY_CURRENT_USER\Software\Microsoft\VisualStudio\10.0\TeamFoundation\Instances. There's one subkey for each registered server.

And yet one thing. If you're using bash or cygwin - note that $ and / symbols could have special meaning depending on where they are. And double quotes don't cancel that (single quotes do). So I'd suggest you to enclose project path in single quotes like I did in prev paragraph.

Doug .

unread,
Aug 23, 2011, 8:51:11 PM8/23/11
to git-t...@googlegroups.com
Hm... Using the server name (from the registry) works for the first repo, but I still get the same result from the second one. 

..and yes, I'm using the git shell from msysgit. 

Aw well... one of the guys here did actually get it working previously, but he's away. Guess I'll wait till he gets back and ask him how he did it.

Ivan Danilov

unread,
Aug 23, 2011, 8:59:53 PM8/23/11
to git-t...@googlegroups.com
The only thing I can think of... maybe you have non-default collections? I faced these after current short-notion was implemented, so git-tfs is able to handle only server-names - and only default collection notions of the server. So if your second project resides in the non-default collection - you still should specify exact Uri for it.

Eventually I'll fix that, but unfortunately I didn't have much time recently...

You can check Uri for a collection in the HKEY_CURRENT_USER\Software\Microsoft\VisualStudio\10.0\TeamFoundation\Instances\<your_tfs_instance_name>\Collections\<your_collection_name> key, just look at Uri value in that key and copy it to git-tfs.
Reply all
Reply to author
Forward
0 new messages