TwitchBronBron
TwitchBronBron

Reputation: 3186

git fatal: repository not found remote access for Internal TFS server

We have an internal hosted instance of Team Foundation Server 2013 with many projects that use GIT source control. If I use Visual Studio 2015, I am able to clone, push, pull, etc. with no problem. However when I try to interact with the server using the git command line, git is unable to communicate with the server. For example, when I try to clone a repository (I am 100% positive that the url is valid), it errors. Here is the output

C:\Projects\>git clone http://tfs_server_name:8080/tfs/CollectionName/_git/SomeProject
Cloning into 'SomeProject'...
fatal: repository 'http://tfs_server_name:8080/tfs/CollectionName/_git/SomeProject/' not found

Our TFS instance is configured to use integrated windows authentication, and so I followed the instructions from this article: https://github.com/Microsoft/Git-Credential-Manager-for-Windows/blob/master/Docs/Faq.md#q-i-thought-microsoft-was-maintaining-this-why-does-the-gcm-not-work-as-expected-with-tfs

I ran the command from that article as instructed (where tfs_server_name is the machine name of our server, and NameOfOurDomain.lcl is our domain):

git config --global credential.tfs_server_name.NameOfOurDomain.lcl.integrated true

This didn't fix the problem either. I ran the command, tried to clone, nothing. I rebooted, tried to clone, nothing.

What else can I do to get git to authenticate against that server?

Upvotes: 4

Views: 3188

Answers (4)

Blake
Blake

Reputation: 68

Do you have any proxy settings set? Check for global git settings for http.proxy and https.proxy in the .gitconfig file in your profile. Also, verify that you don't have any environment variables set pointing to a proxy server (HTTP_PROXY and HTTPS_PROXY).

Most proxy servers do not allow internal access, so it is possible that, if you have git configured to point to a proxy, the TFS server actually can't be seen by the proxy server and therefore git can't see the repository.

Upvotes: 3

Eddie Chen - MSFT
Eddie Chen - MSFT

Reputation: 29976

The URL you provided is incorrect.

Your URL:

http://tfs_server_name:8080/tfs/TeamProjectName/_git/SomeProject/

Correct URL:

http://tfs_server_name:8080/tfs/CollectionName/_git/ProjectName/

Since you mentioned it works with VS2015, so you can check the URL from "Visual Studio\Team Explorer\Settings\Repository Settings\Remotes".

Upvotes: 0

James Lawruk
James Lawruk

Reputation: 31353

This is a bit convoluted, but it may help the cause.

In your command prompt:

runas /profile /user:your_domain\your-user-id "cmd.exe"

This opens a new command prompt window. In the new window...

cd c:\projects
git clone http://tfs_server_name:8080/tfs/TeamProjectName/_git/SomeProject

Upvotes: -1

Cece Dong - MSFT
Cece Dong - MSFT

Reputation: 31083

I just tried with Git command line + TFS 2013.5, no issue occurred.

  1. Make sure you are using the latest Git (I'm using 2.10.1 64-bit version of Git for Windows).
  2. Remove the credential of git: http://tfsserver:8080 in Credential Manager.
  3. Type the credential that can access the repo to clone it.

enter image description here

Upvotes: 0

Related Questions