Problem connecting to visualstudio.com

Jan 15, 2013 at 4:51 PM

Hi,

I've just installed git-tf and tried to clone from our Team Foundation Service repository using these instructions:  http://tfs.visualstudio.com/en-us/learn/code/use-git-and-vs-with-tfs/  

I'm getting repeated prompts to enter my password before receiving the error message:

git-tf: Access denied connecting to TFS server 

Can anyone tell me what the problem might be here or how I should go about debugging it?

Thanks,

J

Developer
Jan 15, 2013 at 4:58 PM

You probably need to enable basic auth for your account : http://www.richard-banks.org/2012/09/using-git-tf-with-tfspreviewcom.html

Jan 15, 2013 at 5:18 PM

Basic auth is enabled. Entering an intentionally incorrect password several times caused visualstudio.com to email me an alert and disable basic auth so it's definitely connecting.

Developer
Jan 15, 2013 at 5:19 PM

Can you try git tf --version ... do you have a version older than 2.0.1.20130107 ?

Developer
Jan 15, 2013 at 5:21 PM

Also, please double-check your server paths.  You'll get a permission denied if you enter an invalid server path.  If you're getting a permission denied message and you're *not* getting a notification that you've entered your password wrong several times, this is the likely culprit.

Jan 15, 2013 at 5:43 PM

I am using version 2.0.1.20130107, am sure my paths are correct and am getting the email notification.

Developer
Jan 15, 2013 at 6:09 PM

Hi,

Probably your TFS server belongs to the same domain/network as the computer you use Git-TF on.

If this is the case, please make sure that the HTTP_PROXY and HTTPS_PROXY environment variables are not set. If they are, you could clean them up by using
   set HTTP_PROXY=
   set HTTPS_PROXY=
commands in the command prompt.

It looks like these variables are needed only if you connect to a TFS server/service out of your network, e.g. in the cloud.

 

 

Jan 15, 2013 at 6:29 PM

I'm using Team Foundation Service (Microsoft's hosted service) rather than Team Foundation Server. Those variables are not set and I don't need a proxy server to connect to the service. It is definitely connecting as Team Foudation Service sends me a security alert email if I enter an incorrect password into git tf multiple times.

Developer
Jan 15, 2013 at 6:39 PM

Can you copy + paste your command line you're executing, and the output?

Can you provide your log files?

Jan 15, 2013 at 6:50 PM

I'm using "git tf clone https://XXXXX.visualstudio.com $\YYYYY" where XXXXX is our account name and YYYYY is the Team Project name.

Can you tell me what log files you are referring to please?

Developer
Jan 15, 2013 at 7:02 PM

Your log files are located at %LOCALAPPDATA%\Microsoft\Team Foundation\4.0\Logs\git-tf-*.log.

Jan 15, 2013 at 7:24 PM

Sorry, I should have said - I'm using git-tf on OS-X.

I've actually just installed git-tf on a windows machine and used the same command to successfully clone the repository. 

Developer
Jan 15, 2013 at 7:26 PM
Edited Jan 15, 2013 at 7:26 PM

In that case:  ~/Library/Application Support/Microsoft/Team Foundation/4.0/Logs/git-tf-*.log.

If you're on a Unix machine, $\YYYY will not work.  Can you try $/YYYY instead?  Or did you just mistype that (above)?

Jan 15, 2013 at 7:32 PM

I can't connect to this Mac remotely so will have to check it tomorrow.  I think I may have been using $\YYYY.

Thanks for all your help.  :)

Jan 16, 2013 at 8:21 AM

I've just successfully cloned our repository!  :)

Checking my bash history I was in fact using $/YYYY however.  I must have been doing something else wrong but really not sure what - either that or perhaps there was a temporary problem with Team Foundation Service.

Jan 17, 2013 at 8:01 AM

A colleague has also tried using git-tf and is experiencing the same problems - even when using the Mac and PC which work for me.  The log file from my pc contains the following (user/tfs account names modified):

 

2013-01-16 09:42:03,920 INFO  [main] (com.microsoft.tfs.jni.loader.NativeLoader) Loaded C:\Chocolatey\lib\Git-TF.2.0.1.20130108\Tools\git-tf-2.0.1.20130107\native\win32\x86\native_auth.dll from user-specified directory

2013-01-16 09:42:04,017 INFO  [main] (com.microsoft.tfs.core.config.httpclient.DefaultHTTPClientFactory) HttpClient configured for https://accountname.visualstudio.com/DefaultCollection, authenticating as logged in user

2013-01-16 09:42:11,715 INFO  [main] (com.microsoft.tfs.jni.loader.NativeLoader) Loaded C:\Chocolatey\lib\Git-TF.2.0.1.20130108\Tools\git-tf-2.0.1.20130107\native\win32\x86\native_console.dll from user-specified directory

2013-01-16 09:42:23,051 INFO  [main] (com.microsoft.tfs.core.config.httpclient.DefaultHTTPClientFactory) HttpClient configured for https://accountname.visualstudio.com/DefaultCollection, authenticating as me@live.com

2013-01-16 09:42:23,958 INFO  [main] (com.microsoft.tfs.core.httpclient.HttpMethodDirector) Failure authenticating with BASIC @accountname.visualstudio.com:443

2013-01-16 09:42:25,753 INFO  [main] (com.microsoft.tfs.core.config.httpclient.DefaultHTTPClientFactory) HttpClient configured for https://accountname.visualstudio.com/DefaultCollection, authenticating as me@live.com

 

Presumably it's a problem on the TFService side but not sure what.  Configuring basic credentials is straightforward and has definitely been done for this user.  Is there any other configuration that could be at fault?  If not, should I raise it with Microsoft as a potential bug in TFService?

Developer
Jan 18, 2013 at 10:52 PM

Can we get the exact command line and the full log related to your colleague issue? I do understand that you do not wish to publish them widely, but is it acceptable for you to send this information to my private e-mail address arukhlin@microsoft.com? I tried to reproduce the issue with my visualstudio.com account, but the only situation when I got similar behaviour was when I entered a correct Live ID, but a wrong password. 

Could you also try the following:
1. In the user Profile>Credentials set the secondary User name as a simple identifier, e.g. JohnDoe
2. Set the password to simple word (8-32 characters without special simbols), e.g. thepassword
3. Try to execute the git tf command with these new settings.

If you agree to do this experiment, please do not forget to restore your original settings after it finishes. :-)