GIT-TF: Access denied connecting to TFS server

Jul 3, 2013 at 6:26 AM
I am trying to upload my files to TFS using GIT-TF.

When I try to checkin (git tf --deep checkin), I keep getting prompt asking for my pwd, after a few times- I get the error: "Access denied connecting to TFS server https://myUserName.visualstudio.com/DefaultCollection/MyTfsProject. You either provided a wrong password or basic authentication is not configured for your account"

I have allowed alternate credentials for this account.

previous command successful:
git-tf --deep configure https://myUserName.visualstudio.com/DefaultCollection/MyTfsProject ~/Desktop/Projects/MyXCodeProject
Configuring repository

I am using Mac OS X Lion 10.7.5 (11G63), and git-tf-2.0.1.20130107.

log:
2013-07-02 08:30:27,044 INFO [main] (com.microsoft.tfs.jni.loader.NativeLoader) Loaded /Users/MyMacUser/git-tf/git-tf-2.0.1.20130107/native/macosx/libnative_auth.jnilib from user-specified directory

2013-07-02 08:30:27,046 INFO [main] (com.microsoft.tfs.jni.natives.NativeAuthMethods) Loaded GSSAPI library: libgssapi_krb5.dylib

2013-07-02 08:30:27,056 WARN [main] (com.microsoft.tfs.jni.natives.NativeAuthMethods) Could not get principal for kerberos 5 credentials (No credentials cache file found)

2013-07-02 08:30:27,059 WARN [main] (com.microsoft.tfs.jni.natives.NativeAuthMethods) Could not get principal for kerberos 5 credentials (No credentials cache file found)

2013-07-02 08:30:27,065 INFO [main] (com.microsoft.gittf.client.clc.commands.CheckinCommand) Default credentials are not available for authentication (no ticket)

2013-07-02 08:30:30,924 INFO [main] (com.microsoft.tfs.jni.loader.NativeLoader) Loaded /Users/MyMacUser/git-tf/git-tf-2.0.1.20130107/native/macosx/libnative_console.jnilib from user-specified directory

2013-07-02 08:30:37,559 INFO [main] (com.microsoft.tfs.jni.loader.NativeLoader) Loaded /Users/MyMacUser/git-tf/git-tf-2.0.1.20130107/native/macosx/libnative_misc.jnilib from user-specified directory

2013-07-02 08:30:37,561 INFO [main] (com.microsoft.tfs.core.config.httpclient.DefaultHTTPClientFactory) HttpClient configured for https://myUserName.visualstudio.com/DefaultCollection/MyTfsProject, authenticating as alter_cred_userName

2013-07-02 08:30:40,013 WARN [main] (com.microsoft.tfs.core.TFSTeamProjectCollection) Error getting data provider

com.microsoft.tfs.core.exceptions.TFSFederatedAuthException: This server requires federated authentication but no mechanism was available to handle it.
    at com.microsoft.tfs.core.exceptions.mappers.TECoreExceptionMapper.map(TECoreExceptionMapper.java:83)

    at com.microsoft.tfs.core.exceptions.mappers.RegistrationExceptionMapper.map(RegistrationExceptionMapper.java:23)

    at com.microsoft.tfs.core.clients.registration.RegistrationData.newFromServer(RegistrationData.java:70)

    at com.microsoft.tfs.core.clients.registration.RegistrationClient.getRegistrationData(RegistrationClient.java:645)

    at com.microsoft.tfs.core.clients.registration.RegistrationClient.getRegistrationEntries(RegistrationClient.java:151)

    at com.microsoft.tfs.core.clients.registration.RegistrationClient.getRegistrationEntries(RegistrationClient.java:135)

    at com.microsoft.tfs.core.PreFrameworkServerDataProvider.findServiceLocation(PreFrameworkServerDataProvider.java:289)

    at com.microsoft.tfs.core.PreFrameworkServerDataProvider.locationForCurrentConnection(PreFrameworkServerDataProvider.java:264)

    at com.microsoft.tfs.core.TFSTeamProjectCollection.getServerDataProvider(TFSTeamProjectCollection.java:169)

    at com.microsoft.tfs.core.TFSConnection.ensureAuthenticated(TFSConnection.java:739)

    at com.microsoft.gittf.client.clc.commands.framework.Command.getConnection(Command.java:354)

    at com.microsoft.gittf.client.clc.commands.framework.Command.getConnection(Command.java:326)

    at com.microsoft.gittf.client.clc.commands.framework.Command.getVersionControlClient(Command.java:474)

    at com.microsoft.gittf.client.clc.commands.CheckinCommand.run(CheckinCommand.java:193)

    at com.microsoft.gittf.client.clc.Main.main(Main.java:328)
Caused by: com.microsoft.tfs.core.ws.runtime.exceptions.FederatedAuthException: https://myUserName.visualstudio.com/DefaultCollection/MyTfsProject/Services/v1.0/Registration.asmx
    at com.microsoft.tfs.core.ws.runtime.client.SOAPService.examineHeadersForFederatedAuthURL(SOAPService.java:1158)

    at com.microsoft.tfs.core.ws.runtime.client.SOAPService.executeSOAPRequestInternal(SOAPService.java:721)

    at com.microsoft.tfs.core.ws.runtime.client.SOAPService.executeSOAPRequest(SOAPService.java:473)

    at ms.tfs.services.registration._03._RegistrationSoap12Service.getRegistrationEntries(_RegistrationSoap12Service.java:105)

    at com.microsoft.tfs.core.clients.registration.RegistrationData.newFromServer(RegistrationData.java:65)

    ... 12 more
2013-07-02 08:30:44,546 INFO [main] (com.microsoft.tfs.core.config.httpclient.DefaultHTTPClientFactory) HttpClient configured for https://myUserName.visualstudio.com/DefaultCollection/MyTfsProject, authenticating as alter_cred_userName

2013-07-02 08:30:45,857 WARN [main] (com.microsoft.tfs.core.TFSTeamProjectCollection) Error getting data provider

com.microsoft.tfs.core.exceptions.TFSFederatedAuthException: This server requires federated authentication but no mechanism was available to handle it.
    at com.microsoft.tfs.core.exceptions.mappers.TECoreExceptionMapper.map(TECoreExceptionMapper.java:83)

    at com.microsoft.tfs.core.exceptions.mappers.RegistrationExceptionMapper.map(RegistrationExceptionMapper.java:23)

    at com.microsoft.tfs.core.clients.registration.RegistrationData.newFromServer(RegistrationData.java:70)

    at com.microsoft.tfs.core.clients.registration.RegistrationClient.getRegistrationData(RegistrationClient.java:645)

    at com.microsoft.tfs.core.clients.registration.RegistrationClient.getRegistrationEntries(RegistrationClient.java:151)

    at com.microsoft.tfs.core.clients.registration.RegistrationClient.getRegistrationEntries(RegistrationClient.java:135)

    at com.microsoft.tfs.core.PreFrameworkServerDataProvider.findServiceLocation(PreFrameworkServerDataProvider.java:289)

    at com.microsoft.tfs.core.PreFrameworkServerDataProvider.locationForCurrentConnection(PreFrameworkServerDataProvider.java:264)

    at com.microsoft.tfs.core.TFSTeamProjectCollection.getServerDataProvider(TFSTeamProjectCollection.java:169)

    at com.microsoft.tfs.core.TFSConnection.ensureAuthenticated(TFSConnection.java:739)

    at com.microsoft.gittf.client.clc.commands.framework.Command.getConnection(Command.java:354)

    at com.microsoft.gittf.client.clc.commands.framework.Command.getConnection(Command.java:326)

    at com.microsoft.gittf.client.clc.commands.framework.Command.getVersionControlClient(Command.java:474)

    at com.microsoft.gittf.client.clc.commands.CheckinCommand.run(CheckinCommand.java:193)

    at com.microsoft.gittf.client.clc.Main.main(Main.java:328)
Caused by: com.microsoft.tfs.core.ws.runtime.exceptions.FederatedAuthException: https://myUserName.visualstudio.com/DefaultCollection/MyTfsProject/Services/v1.0/Registration.asmx
    at com.microsoft.tfs.core.ws.runtime.client.SOAPService.examineHeadersForFederatedAuthURL(SOAPService.java:1158)

    at com.microsoft.tfs.core.ws.runtime.client.SOAPService.executeSOAPRequestInternal(SOAPService.java:721)

    at com.microsoft.tfs.core.ws.runtime.client.SOAPService.executeSOAPRequest(SOAPService.java:473)

    at ms.tfs.services.registration._03._RegistrationSoap12Service.getRegistrationEntries(_RegistrationSoap12Service.java:105)

    at com.microsoft.tfs.core.clients.registration.RegistrationData.newFromServer(RegistrationData.java:65)

    ... 12 more
2013-07-02 08:30:50,112 INFO [main] (com.microsoft.tfs.core.config.httpclient.DefaultHTTPClientFactory) HttpClient configured for https://myUserName.visualstudio.com/DefaultCollection/MyTfsProject, authenticating as alter_cred_userName

2013-07-02 08:30:51,409 WARN [main] (com.microsoft.tfs.core.TFSTeamProjectCollection) Error getting data provider

com.microsoft.tfs.core.exceptions.TFSFederatedAuthException: This server requires federated authentication but no mechanism was available to handle it.
    at com.microsoft.tfs.core.exceptions.mappers.TECoreExceptionMapper.map(TECoreExceptionMapper.java:83)

    at com.microsoft.tfs.core.exceptions.mappers.RegistrationExceptionMapper.map(RegistrationExceptionMapper.java:23)

    at com.microsoft.tfs.core.clients.registration.RegistrationData.newFromServer(RegistrationData.java:70)

    at com.microsoft.tfs.core.clients.registration.RegistrationClient.getRegistrationData(RegistrationClient.java:645)

    at com.microsoft.tfs.core.clients.registration.RegistrationClient.getRegistrationEntries(RegistrationClient.java:151)

    at com.microsoft.tfs.core.clients.registration.RegistrationClient.getRegistrationEntries(RegistrationClient.java:135)

    at com.microsoft.tfs.core.PreFrameworkServerDataProvider.findServiceLocation(PreFrameworkServerDataProvider.java:289)

    at com.microsoft.tfs.core.PreFrameworkServerDataProvider.locationForCurrentConnection(PreFrameworkServerDataProvider.java:264)

    at com.microsoft.tfs.core.TFSTeamProjectCollection.getServerDataProvider(TFSTeamProjectCollection.java:169)

    at com.microsoft.tfs.core.TFSConnection.ensureAuthenticated(TFSConnection.java:739)

    at com.microsoft.gittf.client.clc.commands.framework.Command.getConnection(Command.java:354)

    at com.microsoft.gittf.client.clc.commands.framework.Command.getConnection(Command.java:326)

    at com.microsoft.gittf.client.clc.commands.framework.Command.getVersionControlClient(Command.java:474)

    ...
Coordinator
Jul 3, 2013 at 2:49 PM
Hi,

The configure command is a client side command that does not need to access the server, so this explains why it worked. When it prompts you for the password, does it have the username correct or does it keep prompting you for the username and password server times? For the username did you type the full identity like user@hotmail.com or did you use a display name?

Thanks
Mireille
Jul 4, 2013 at 6:29 AM
Hi,
It prompts me for my userName (it gives me no default, I type the userName), and after I type my user name, it asks for my pwd.
Although I type the correct pwd matching my userName (both defined on "ALTERNATE AUTHENTICATION CREDENTIALS") it keeps prompting for pwd for a few more times.
After 4 or 5 times of a repeating pwd request, I get the following error: ""Access denied connecting to TFS server https://myUserName.visualstudio.com/DefaultCollection/MyTfsProject. You either provided a wrong password or basic authentication is not configured for your account"

I tried a few user-names, all defined on "ALTERNATE AUTHENTICATION CREDENTIALS": i tried the "User name (primary) " and the "User name (secondary)". Both ended with the same result.
Developer
Jul 4, 2013 at 12:41 PM
Hi titim,

As far as I can see you use a rather old version of the Git-TF. If you can download the latest sources and build Git-TF locally, I would recommend to give that a try. Or could you install the latest built version, i.e. 2.0.2.2013021? As you might see on the project's home page: Git-TF 2.0.2 has been released to fix a couple of very important issues around connecting to your hosted instance at visualstudio.com and in using Git-TF with the latest version of Java 7 from Oracle on Mac OS X. I hope that could help to resolve your issue. Please make sure that you've removed (or archived off if you wish) the current Git-TF version to make sure that the new version does not interact with the old one.

Sorry for inconvenience,
Alex
Jul 7, 2013 at 11:26 AM
Hi again,

I downloaded the newest version, and reconfigured.

I keep getting the same error:
MyMacUsers-Mac-mini:MyProject MyMacUser$ git tf --deep checkin
Username: alter_cred_userName
Password:
Connecting to TFS...
Password:
Password:
Password:
git-tf: Access denied connecting to TFS server https://myUserName.visualstudio.com/ (authenticating as alter_cred_userName)
What can I do?

thanks,
Titim
Coordinator
Jul 8, 2013 at 2:53 PM
Hi Titim,

do you have any special characters in the username? are you able to connect to that same account using any other client like Visual Studio or Team Explorer everywhere?


Sorry this is taking too long to resolve

Thanks
Mireille
Jul 9, 2013 at 5:59 AM
Hi,

I have no special characters in my username (all are letters between a to z. My primary username is a valid e-mail.

I am able to connect https://myUserName.visualstudio.com/DefaultCollection.

My colleague could not check-in the file to his account also (using my mac, and my project).

What can possibly go wrong?
Developer
Jul 9, 2013 at 4:41 PM
Hi Titim,

I'm apologize that I haven't noticed that earlier, but the configure command you mentioned in your first message, i.e.
git-tf --deep configure https://myUserName.visualstudio.com/DefaultCollection/MyTfsProject ~/Desktop/Projects/MyXCodeProject
does not look correct:
  1. The first parameter has to specify a Team Project Collection rather than a Team Project
  2. The second parameter has to specify a server path rather than a local path.
So, the correct command should look like:
cd ~/Desktop/Projects/MyXCodeProject
git-tf –deep --force configure https://myUserName.visualstudio.com/DefaultCollection $/MyTfsProject
or
cd ~/Desktop/Projects/MyXCodeProject
git-tf –deep --force configure https://myUserName.visualstudio.com/DefaultCollection $/MyTfsProject/MyXCodeProject
The difference in the two above is in that the first configuration maps all your ~/Desktop/Projects/MyXCodeProject folder content as direct children of the $/MyTfsProject folder on the TFS server. While the second one will create the MyXCodeProject sub-folder inside of the $/MyTfsProject folder. (I've used the --force option just for your case because if you wish to re-configure a Git-TF project that is already configured with some TFS server, you need --force to override the existing configuration.)

Also it would be helpful if you could provide us the detailed git-tf logs in case the issue persists. You could find them in ~/Library/Application Support/Microsoft/Team Foundation/4.0/Logs/git-tf-*.log.
To collect the detailed log you also need to create the ~/Library/Application Support/Microsoft/Team Foundation/4.0/Configuration/log4j-git-tf.properties with the following content:
# Set root category priority to DEBUG and its only appender to LOGFILE.
log4j.rootCategory=DEBUG, LOGFILE

# Set SOAP logging to INFO
log4j.logger.com.microsoft.tfs.core.ws.runtime.client.SOAPService=INFO, SOAP-LOGFILE
log4j.additivity.com.microsoft.tfs.core.ws.runtime.client.SOAPService=false

# CONSOLE log (default)
#log4j.appender.CONSOLE=org.apache.log4j.ConsoleAppender
#log4j.appender.CONSOLE.layout=org.apache.log4j.PatternLayout
#log4j.appender.CONSOLE.layout.ConversionPattern=%-5p %m%n

# LOGFILE log
log4j.appender.LOGFILE=com.microsoft.gittf.client.clc.util.logging.LogAppender
log4j.appender.LOGFILE.File=git-tf
log4j.appender.LOGFILE.Append=false
log4j.appender.LOGFILE.layout=org.apache.log4j.PatternLayout
log4j.appender.LOGFILE.layout.ConversionPattern=%d %-5p [%t] (%c) %m%n

# SOAP-LOGFILE log
log4j.appender.SOAP-LOGFILE=com.microsoft.gittf.client.clc.util.logging.LogAppender
log4j.appender.SOAP-LOGFILE.File=git-tf-soap
log4j.appender.SOAP-LOGFILE.Append=false
log4j.appender.SOAP-LOGFILE.layout=org.apache.log4j.PatternLayout
log4j.appender.SOAP-LOGFILE.layout.ConversionPattern=%d %m%n
Thanks,
Alex

P.S. You could use my private e-mail arukhlin@microsoft.com to send the logs.
Jul 10, 2013 at 8:56 AM
Hi Alex,

I have tried the suggested solution to the problem, but unfortunately still getting the same error.
Any ideas how can I continue from here?

Thanks,
Titim
Jun 2, 2014 at 1:39 PM
Edited Jun 2, 2014 at 1:57 PM
HI,

I know the thread is old, but I'm having the same issue. Any solution?

I'm using version 2.0.3.20131219
Trying to connect to a repo in visualstudio.com.

The same credentials work using TFS for Eclipse.

Part of logs ahead:

Thanks
YBM


2014-06-02 09:30:18,782 INFO [main] (com.microsoft.tfs.jni.loader.NativeLoader) Loaded c:\Chocolatey\lib\Git-TF.2.0.3.20131219\Tools\git-tf-2.0.3.20131219\native\win32\x86\native_auth.dll from user-specified directory
2014-06-02 09:30:19,294 INFO [main] (com.microsoft.tfs.core.config.httpclient.DefaultHTTPClientFactory) HttpClient configured for https://<name>.visualstudio.com/tfs/DefaultCollection, authenticating as logged in user
2014-06-02 09:30:21,308 WARN [main] (com.microsoft.tfs.core.TFSTeamProjectCollection) Error getting data provider
com.microsoft.tfs.core.exceptions.TFSFederatedAuthException: This server requires federated authentication but no mechanism was available to handle it.
at com.microsoft.tfs.core.exceptions.mappers.TECoreExceptionMapper.map(TECoreExceptionMapper.java:85)
at com.microsoft.tfs.core.exceptions.mappers.RegistrationExceptionMapper.map(RegistrationExceptionMapper.java:23)
at com.microsoft.tfs.core.clients.registration.RegistrationData.newFromServer(RegistrationData.java:70)
at com.microsoft.tfs.core.clients.registration.RegistrationClient.getRegistrationData(RegistrationClient.java:645)
at com.microsoft.tfs.core.clients.registration.RegistrationClient.getRegistrationEntries(RegistrationClient.java:151)
at com.microsoft.tfs.core.clients.registration.RegistrationClient.getRegistrationEntries(RegistrationClient.java:135)
at com.microsoft.tfs.core.PreFrameworkServerDataProvider.findServiceLocation(PreFrameworkServerDataProvider.java:289)
at com.microsoft.tfs.core.PreFrameworkServerDataProvider.locationForCurrentConnection(PreFrameworkServerDataProvider.java:264)
at com.microsoft.tfs.core.TFSTeamProjectCollection.getServerDataProvider(TFSTeamProjectCollection.java:177)
at com.microsoft.tfs.core.TFSConnection.ensureAuthenticated(TFSConnection.java:739)
at com.microsoft.gittf.client.clc.commands.framework.Command.getConnection(Command.java:400)
at com.microsoft.gittf.client.clc.commands.framework.Command.getConnection(Command.java:372)
at com.microsoft.gittf.client.clc.commands.CloneCommand.run(CloneCommand.java:203)
at com.microsoft.gittf.client.clc.Main.main(Main.java:328)
Caused by: com.microsoft.tfs.core.ws.runtime.exceptions.FederatedAuthException: TF400813: Resource not available for anonymous access. Client authentication required.
at com.microsoft.tfs.core.ws.runtime.client.SOAPService.examineHeadersForFederatedAuthURL(SOAPService.java:1169)
at com.microsoft.tfs.core.ws.runtime.client.SOAPService.executeSOAPRequestInternal(SOAPService.java:716)
at com.microsoft.tfs.core.ws.runtime.client.SOAPService.executeSOAPRequest(SOAPService.java:475)
at ms.tfs.services.registration._03._RegistrationSoap12Service.getRegistrationEntries(_RegistrationSoap12Service.java:105)
at com.microsoft.tfs.core.clients.registration.RegistrationData.newFromServer(RegistrationData.java:65)
... 11 more
2014-06-02 09:30:31,992 INFO [main] (com.microsoft.tfs.jni.loader.NativeLoader) Loaded c:\Chocolatey\lib\Git-TF.2.0.3.20131219\Tools\git-tf-2.0.3.20131219\native\win32\x86\native_console.dll from user-specified directory
2014-06-02 09:30:35,520 INFO [main] (com.microsoft.tfs.core.config.httpclient.DefaultHTTPClientFactory) HttpClient configured for https://<name>.visualstudio.com/tfs/DefaultCollection, authenticating as <my-email@outlook.com 2014-06-02 09:30:37,581 INFO [main] (com.microsoft.tfs.core.httpclient.HttpMethodDirector) Failure authenticating with BASIC @<name>.visualstudio.com:443 2014-06-02 09:30:37,583 WARN [main] (com.microsoft.tfs.core.TFSTeamProjectCollection) Error getting data provider
com.microsoft.tfs.core.exceptions.TFSUnauthorizedException: Access denied connecting to TFS server https://<name>.visualstudio.com/ (authenticating as <my-email@outlook.com)
at com.microsoft.tfs.core.exceptions.mappers.TECoreExceptionMapper.map(TECoreExceptionMapper.java:77)
at com.microsoft.tfs.core.exceptions.mappers.RegistrationExceptionMapper.map(RegistrationExceptionMapper.java:23)
at com.microsoft.tfs.core.clients.registration.RegistrationData.newFromServer(RegistrationData.java:70)
at com.microsoft.tfs.core.clients.registration.RegistrationClient.getRegistrationData(RegistrationClient.java:645)
at com.microsoft.tfs.core.clients.registration.RegistrationClient.getRegistrationEntries(RegistrationClient.java:151)
at com.microsoft.tfs.core.clients.registration.RegistrationClient.getRegistrationEntries(RegistrationClient.java:135)
at com.microsoft.tfs.core.PreFrameworkServerDataProvider.findServiceLocation(PreFrameworkServerDataProvider.java:289)
at com.microsoft.tfs.core.PreFrameworkServerDataProvider.locationForCurrentConnection(PreFrameworkServerDataProvider.java:264)
at com.microsoft.tfs.core.TFSTeamProjectCollection.getServerDataProvider(TFSTeamProjectCollection.java:177)
at com.microsoft.tfs.core.TFSConnection.ensureAuthenticated(TFSConnection.java:739)
at com.microsoft.gittf.client.clc.commands.framework.Command.getConnection(Command.java:400)
at com.microsoft.gittf.client.clc.commands.framework.Command.getConnection(Command.java:372)
at com.microsoft.gittf.client.clc.commands.CloneCommand.run(CloneCommand.java:203)
at com.microsoft.gittf.client.clc.Main.main(Main.java:328)
Caused by: com.microsoft.tfs.core.ws.runtime.exceptions.UnauthorizedException: Authorization failure connecting to 'https://<name>.visualstudio.com/tfs/DefaultCollection/Services/v1.0/Registration.asmx' (authenticating as <my-email@outlook.com)
at com.microsoft.tfs.core.ws.runtime.client.SOAPService.examineHeadersForFederatedAuthURL(SOAPService.java:1191)
at com.microsoft.tfs.core.ws.runtime.client.SOAPService.executeSOAPRequestInternal(SOAPService.java:716)
at com.microsoft.tfs.core.ws.runtime.client.SOAPService.executeSOAPRequest(SOAPService.java:475)
at ms.tfs.services.registration._03._RegistrationSoap12Service.getRegistrationEntries(_RegistrationSoap12Service.java:105)
at com.microsoft.tfs.core.clients.registration.RegistrationData.newFromServer(RegistrationData.java:65)
... 11 more
2014-06-02 09:30:40,913 INFO [main] (com.microsoft.tfs.core.config.httpclient.DefaultHTTPClientFactory) HttpClient configured for https://<name>.visualstudio.com/tfs/DefaultCollection, authenticating as <my-email@outlook.com 2014-06-02 09:30:43,151 INFO [main] (com.microsoft.tfs.core.httpclient.HttpMethodDirector) Failure authenticating with BASIC @<name>.visualstudio.com:443 2014-06-02 09:30:43,152 WARN [main] (com.microsoft.tfs.core.TFSTeamProjectCollection) Error getting data provider
com.microsoft.tfs.core.exceptions.TFSUnauthorizedException: Access denied connecting to TFS server https://<name>.visualstudio.com/ (authenticating as <my-email@outlook.com)
at com.microsoft.tfs.core.exceptions.mappers.TECoreExceptionMapper.map(TECoreExceptionMapper.java:77)
at com.microsoft.tfs.core.exceptions.mappers.RegistrationExceptionMapper.map(RegistrationExceptionMapper.java:23)
at com.microsoft.tfs.core.clients.registration.RegistrationData.newFromServer(RegistrationData.java:70)
at com.microsoft.tfs.core.clients.registration.RegistrationClient.getRegistrationData(RegistrationClient.java:645)
at com.microsoft.tfs.core.clients.registration.RegistrationClient.getRegistrationEntries(RegistrationClient.java:151)
at com.microsoft.tfs.core.clients.registration.RegistrationClient.getRegistrationEntries(RegistrationClient.java:135)
at com.microsoft.tfs.core.PreFrameworkServerDataProvider.findServiceLocation(PreFrameworkServerDataProvider.java:289)
at com.microsoft.tfs.core.PreFrameworkServerDataProvider.locationForCurrentConnection(PreFrameworkServerDataProvider.java:264)
at com.microsoft.tfs.core.TFSTeamProjectCollection.getServerDataProvider(TFSTeamProjectCollection.java:177)
at com.microsoft.tfs.core.TFSConnection.ensureAuthenticated(TFSConnection.java:739)
at com.microsoft.gittf.client.clc.commands.framework.Command.getConnection(Command.java:400)
at com.microsoft.gittf.client.clc.commands.framework.Command.getConnection(Command.java:372)
at com.microsoft.gittf.client.clc.commands.CloneCommand.run(CloneCommand.java:203)
at com.microsoft.gittf.client.clc.Main.main(Main.java:328)
Caused by: com.microsoft.tfs.core.ws.runtime.exceptions.UnauthorizedException: Authorization failure connecting to 'https://<name>.visualstudio.com/tfs/DefaultCollection/Services/v1.0/Registration.asmx' (authenticating as <my-email@outlook.com)
at com.microsoft.tfs.core.ws.runtime.client.SOAPService.examineHeadersForFederatedAuthURL(SOAPService.java:1191)
at com.microsoft.tfs.core.ws.runtime.client.SOAPService.executeSOAPRequestInternal(SOAPService.java:716)
at com.microsoft.tfs.core.ws.runtime.client.SOAPService.executeSOAPRequest(SOAPService.java:475)
at ms.tfs.services.registration._03._RegistrationSoap12Service.getRegistrationEntries(_RegistrationSoap12Service.java:105)
at com.microsoft.tfs.core.clients.registration.RegistrationData.newFromServer(RegistrationData.java:65)
... 11 more
2014-06-02 09:30:45,214 INFO [main] (com.microsoft.tfs.core.config.httpclient.DefaultHTTPClientFactory) HttpClient configured for https://<name>.visualstudio.com/tfs/DefaultCollection, authenticating as <my-email@outlook.com 2014-06-02 09:30:47,561 INFO [main] (com.microsoft.tfs.core.httpclient.HttpMethodDirector) Failure authenticating with BASIC @<name>.visualstudio.com:443
<more>
Developer
Jun 2, 2014 at 1:55 PM
Hi,

Could you please provide more detailed information regarding your case? Which OS do you use, what Git-TF and Java version? How did you configured your repository? Have you enabled alternative credentials in your profile on the hosted TFS server? Have you defined (and used) the secondary user name for them?

Alex
Jun 2, 2014 at 2:26 PM
Hi Alex,

I was getting the info for you and I got to the alternative credentials and that is the step that was missing. I read something about it in the thread but I thought it was in my local computer.

I set it in the server and it worked. I enabled alternatived credentials in the TFS server and used the secondary user name.

Thanks for the quick response.

YBM