TwitchBronBron TwitchBronBron - 1 month ago 21
Git Question

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?

Answer

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.