TFS repo not found error when cloning with git-tfs

3,253 views
Skip to first unread message

Isxek

unread,
Jun 5, 2012, 8:26:02 PM6/5/12
to git-tfs-dev
I'm getting the following error when I try cloning our TFS repo:
---------
$ git tfs clone http://tfs:8080 $/testproj
Initialized empty Git repository in C:/projs/testproj/.git/
TF31002: Unable to connect to this Team Foundation Server: http://tfs:8080/.
Team Foundation Server Url: http://tfs:8080/.

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.
---------

I'm running this within the Git Bash shell supplied with the Git for
Windows install.
I can update my working copy from within VS 2010 and with the TFS
Powertools extension without any problems, so I know I can connect to
the TFS server.
Is there anything I need to do to get this working? Thanks in advance.

Matt Burke

unread,
Jun 6, 2012, 12:39:26 AM6/6/12
to git-t...@googlegroups.com
Which version of TFS is running on the server? If it's 2010 or newer,
you'll need to include the collection in the URL. For example, instead
of http://tfs:8080/, try http://tfs:8080/tfs/DefaultCollection.

--
Matt
> --
> You received this message because you are subscribed to the Google Groups "git-tfs-dev" group.
> To post to this group, send email to git-t...@googlegroups.com.
> To unsubscribe from this group, send email to git-tfs-dev...@googlegroups.com.
> For more options, visit this group at http://groups.google.com/group/git-tfs-dev?hl=en.
>

isxek...@lycos.com

unread,
Jun 6, 2012, 3:00:32 AM6/6/12
to git-t...@googlegroups.com
I confirmed it was 2010. However, I'm getting essentially the same error when I try that:

$ git tfs clone http://tfs:8080/tfs/swcollection $/testproj
Initialized empty Git repository in c:/proj/testproj/.git/
error: remote TFS repository path was not found

"http://tfs:8080/tfs/swcollection" is the TFS URL I'm seeing from the .sln file. I took that as a cue, but got the above instead.
> To unsubscribe from this group, send email to git-tfs-dev+unsubscribe@googlegroups.com.

isxek...@lycos.com

unread,
Jun 6, 2012, 8:06:47 AM6/6/12
to git-t...@googlegroups.com
Hi Matt,


At home, I tried the following prompt:

git tfs clone http://<TFS server IP address>:8080/tfs/swcollection $/<ProjectName> <folder>

It prompted for my domain credentials, and it proceeded cloning the TFS repo without any issues.

The problem appears *not* to be related to Git-TFS, so I'm happy at that. I still have to look further when I come back to the office, though.

Sorry for the noise, and thanks for your help!

--Arnel

Matt Burke

unread,
Jun 6, 2012, 8:13:21 AM6/6/12
to git-t...@googlegroups.com
You're getting a different error, so I'd guess that
http://tfs:8080/tfs/swcollection is right, but it can't find
$/testproj. Can you double-check that it's spelled right? You can use
tf.exe to double-check that it's spelled right by doing in a VS2010
Command Prompt:

tf dir /server:http://tfs:8080/tfs/swcollection $/

or

tf dir /server:http://tfs:8080/tfs/swcollection $/testproj

--
Matt
>> > git-tfs-dev...@googlegroups.com.
>> > For more options, visit this group at
>> > http://groups.google.com/group/git-tfs-dev?hl=en.
>> >
>
> --
> You received this message because you are subscribed to the Google Groups
> "git-tfs-dev" group.
> To view this discussion on the web visit
> https://groups.google.com/d/msg/git-tfs-dev/-/J1TtxBcWPHgJ.
>
> To post to this group, send email to git-t...@googlegroups.com.
> To unsubscribe from this group, send email to
> git-tfs-dev...@googlegroups.com.

Matt Burke

unread,
Jun 6, 2012, 8:14:41 AM6/6/12
to git-t...@googlegroups.com
Great! I'm glad you got it working!
>>> > git-tfs-dev...@googlegroups.com.
>>> > For more options, visit this group at
>>> > http://groups.google.com/group/git-tfs-dev?hl=en.
>>> >
>
> --
> You received this message because you are subscribed to the Google Groups
> "git-tfs-dev" group.
> To view this discussion on the web visit
> https://groups.google.com/d/msg/git-tfs-dev/-/WUp268z4wRIJ.
>
> To post to this group, send email to git-t...@googlegroups.com.
> To unsubscribe from this group, send email to
> git-tfs-dev...@googlegroups.com.

hanks...@gmail.com

unread,
Nov 2, 2017, 10:34:58 AM11/2/17
to git-tfs-dev
For other people stumbling across this in the future, there's an additional reason you might be getting errors like this:

Your user doesn't have permission to access the specific branch you're trying to clone.  For example, the default branch might be locked down to only be accessible to a user who is not you, even if you are an administrator of the TFS server.  Here's the precise error I was getting:

System.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocation. ---> LibGit2Sharp.NotFoundException: Failed to resolve path 'C:/Users/.../.git/~w/...': The system cannot find the path specified.

This was using Git-TFS 0.27 with TFS 2017.

Hope this helps someone in the future!
Reply all
Reply to author
Forward
0 new messages