如何解决Tee clc授权错误

如何解决如何解决Tee clc授权错误

我正在尝试为现有工作区运行tf wrokspaces命令,因此可以按照以下建议在jetbrains rider中使用它 Jetbrains Rider Article

当我运行命令时,我总是会遇到错误,

"TF31003: Either you have not entered the necessary credentials or your user account does not have permission to connect to the Team Foundation Server at https://tfs.app.visualstudio.com/. Ask your server administrator to add the appropriate permissions to your account.

TF400813: The user 'Windows Live ID\xxxxxxxxxx' is not authorized to access this resource.
com.microsoft.tfs.core.exceptions.TFSAccessException: You do not have permission to access the server."

I have all the necessary permission(i.e. Administrator) on tfs server to run tf workspaces command. 

In the log file of tee clc,"2020-09-10 16:14:13,252 INFO  [main] (com.microsoft.tfs.core.telemetry.TfsTelemetryHelper) Command Line Client v.14.134.0.201804261732
2020-09-10 16:14:13,252 INFO  [main] (com.microsoft.tfs.core.telemetry.TfsTelemetryHelper) AppInsights telemetry initialized
2020-09-10 16:14:13,252 INFO  [main] (com.microsoft.tfs.core.telemetry.TfsTelemetryHelper)     Developer Mode: false
2020-09-10 16:14:13,252 INFO  [main] (com.microsoft.tfs.core.telemetry.TfsTelemetryHelper)     Production Environment: true
2020-09-10 16:14:13,425 INFO  [main] (com.microsoft.alm.provider.UserPasswordCredentialProvider) Getting credential that works for uri: https://xxxxx.visualstudio.com/
2020-09-10 16:14:13,425 INFO  [main] (com.microsoft.alm.provider.UserPasswordCredentialProvider) Getting credential based on OAuth2 token
2020-09-10 16:14:13,426 INFO  [main] (com.microsoft.alm.auth.oauth.OAuth2Authenticator) Ready to launch browser flow to retrieve oauth2 token.
2020-09-10 16:14:13,426 INFO  [main] (com.microsoft.alm.auth.oauth.OAuth2Authenticator) Attempt to use oauth2-useragent provider: JavaFx
2020-09-10 16:14:13,427 INFO  [main] (com.microsoft.alm.auth.oauth.OAuth2Authenticator) Using oauth2-useragent providers to retrieve AAD token.
2020-09-10 16:14:52,003 INFO  [main] (com.microsoft.alm.provider.UserPasswordCredentialProvider) Username exist? true,password exists? true
2020-09-10 16:14:52,089 INFO  [main] (com.microsoft.tfs.core.config.httpclient.DefaultHTTPClientFactory) HttpClient configured for https://xxxxxx.visualstudio.com/,authenticating as OAuth2
2020-09-10 16:14:53,186 WARN  [main] (com.microsoft.tfs.core.httpclient.HttpMethodDirector) Unable to respond to any of these challenges: {bearer=Bearer authorization_uri=https://login.microsoftonline.com/12fb99fd-4c12-44fb-b3ce-a12ca5aadf63,tfs-federated=TFS-Federated}
2020-09-10 16:14:53,929 WARN  [main] (com.microsoft.tfs.core.TFSTeamProjectCollection) Error getting data provider
com.microsoft.tfs.core.exceptions.TFSAccessException: You do not have permission to access the server.

TF31003: Either you have not entered the necessary credentials or your user account does not have permission to connect to the Team Foundation Server at https://tfs.app.visualstudio.com/. Ask your server administrator to add the appropriate permissions to your account.

TF400813: The user 'Windows Live ID\xxxxx' is not authorized to access this resource.
    at com.microsoft.tfs.core.exceptions.mappers.TECoreExceptionMapper.map(TECoreExceptionMapper.java:84)
    at com.microsoft.tfs.core.exceptions.mappers.RegistrationExceptionMapper.map(RegistrationExceptionMapper.java:18)
    at com.microsoft.tfs.core.clients.registration.RegistrationData.newFromServer(RegistrationData.java:61)
    at com.microsoft.tfs.core.clients.registration.RegistrationClient.getRegistrationData(RegistrationClient.java:617)
    at com.microsoft.tfs.core.clients.registration.RegistrationClient.getRegistrationEntries(RegistrationClient.java:144)
    at com.microsoft.tfs.core.clients.registration.RegistrationClient.getRegistrationEntries(RegistrationClient.java:129)
    at com.microsoft.tfs.core.PreFrameworkServerDataProvider.findServiceLocation(PreFrameworkServerDataProvider.java:275)
    at com.microsoft.tfs.core.PreFrameworkServerDataProvider.locationForCurrentConnection(PreFrameworkServerDataProvider.java:251)
    at com.microsoft.tfs.core.TFSTeamProjectCollection.getServerDataProvider(TFSTeamProjectCollection.java:172)
    at com.microsoft.tfs.core.TFSConnection.getWebService(TFSConnection.java:903)
    at com.microsoft.tfs.core.config.client.DefaultClientFactory$7.newClient(DefaultClientFactory.java:208)
    at com.microsoft.tfs.core.config.client.DefaultClientFactory.newClient(DefaultClientFactory.java:86)
    at com.microsoft.tfs.core.TFSConnection.getClient(TFSConnection.java:1490)
    at com.microsoft.tfs.core.TFSTeamProjectCollection.getVersionControlClient(TFSTeamProjectCollection.java:376)
    at com.microsoft.tfs.client.clc.vc.commands.CommandWorkspaces.displayAndUpdate(CommandWorkspaces.java:295)
    at com.microsoft.tfs.client.clc.vc.commands.CommandWorkspaces.run(CommandWorkspaces.java:93)
    at com.microsoft.tfs.client.clc.Application.run(Application.java:306)
    at com.microsoft.tfs.client.clc.Application.run(Application.java:154)
    at com.microsoft.tfs.client.clc.vc.Main.main(Main.java:55)
2020-09-10 16:14:53,932 ERROR [main] (com.microsoft.tfs.client.clc.Application) An error occurred: You do not have permission to access the server.

TF31003: Either you have not entered the necessary credentials or your user account does not have permission to connect to the Team Foundation Server at https://tfs.app.visualstudio.com/. Ask your server administrator to add the appropriate permissions to your account.

TF400813: The user 'Windows Live ID\xxxxxxxx' is not authorized to access this resource.
com.microsoft.tfs.core.exceptions.TFSAccessException: You do not have permission to access the server.

TF31003: Either you have not entered the necessary credentials or your user account does not have permission to connect to the Team Foundation Server at https://tfs.app.visualstudio.com/. Ask your server administrator to add the appropriate permissions to your account.

TF400813: The user 'Windows Live ID\xxxxxxxx' is not authorized to access this resource.
    at com.microsoft.tfs.core.exceptions.mappers.TECoreExceptionMapper.map(TECoreExceptionMapper.java:84)
    at com.microsoft.tfs.core.exceptions.mappers.RegistrationExceptionMapper.map(RegistrationExceptionMapper.java:18)
    at com.microsoft.tfs.core.clients.registration.RegistrationData.newFromServer(RegistrationData.java:61)
    at com.microsoft.tfs.core.clients.registration.RegistrationClient.getRegistrationData(RegistrationClient.java:617)
    at com.microsoft.tfs.core.clients.registration.RegistrationClient.getRegistrationEntries(RegistrationClient.java:144)
    at com.microsoft.tfs.core.clients.registration.RegistrationClient.getRegistrationEntries(RegistrationClient.java:129)
    at com.microsoft.tfs.core.PreFrameworkServerDataProvider.findServiceLocation(PreFrameworkServerDataProvider.java:275)
    at com.microsoft.tfs.core.PreFrameworkServerDataProvider.locationForCurrentConnection(PreFrameworkServerDataProvider.java:251)
    at com.microsoft.tfs.core.TFSTeamProjectCollection.getServerDataProvider(TFSTeamProjectCollection.java:172)
    at com.microsoft.tfs.core.TFSConnection.getWebService(TFSConnection.java:903)
    at com.microsoft.tfs.core.config.client.DefaultClientFactory$7.newClient(DefaultClientFactory.java:208)
    at com.microsoft.tfs.core.config.client.DefaultClientFactory.newClient(DefaultClientFactory.java:86)
    at com.microsoft.tfs.core.TFSConnection.getClient(TFSConnection.java:1490)
    at com.microsoft.tfs.core.TFSTeamProjectCollection.getVersionControlClient(TFSTeamProjectCollection.java:376)
    at com.microsoft.tfs.client.clc.vc.commands.CommandWorkspaces.displayAndUpdate(CommandWorkspaces.java:295)
    at com.microsoft.tfs.client.clc.vc.commands.CommandWorkspaces.run(CommandWorkspaces.java:93)
    at com.microsoft.tfs.client.clc.Application.run(Application.java:306)
    at com.microsoft.tfs.client.clc.Application.run(Application.java:154)
    at com.microsoft.tfs.client.clc.vc.Main.main(Main.java:55)
2020-09-10 16:14:53,933 INFO  [main] (com.microsoft.tfs.client.clc.vc.Main) Shutting down
2020-09-10 16:14:53,934 INFO  [main] (com.microsoft.tfs.client.clc.vc.Main) Has shut down"

要验证tee clc是否已安装且正常工作,我创建了新组织并运行相同的工作区命令。它与新组织合作良好。同样从Visual Studio中,我可以毫无问题地使用现有的工作区。

能帮您解决授权问题吗?

谢谢!

解决方法

要缩小问题范围,请检查以下各项:

  1. 检查您的组织是否支持AAD,登录帐户是<appender name="stdout" class="ch.qos.logback.core.ConsoleAppender"> <layout class="ch.qos.logback.contrib.json.classic.JsonLayout"> <timestampFormat>yyyy-MM-dd'T'HH:mm:ss.SSSX</timestampFormat> <timestampFormatTimezoneId>Etc/UTC</timestampFormatTimezoneId> <jsonFormatter class="ch.qos.logback.contrib.jackson.JacksonJsonFormatter"> <prettyPrint>true</prettyPrint> </jsonFormatter> </layout> </appender> 还是Windows Live ID\xxxxx

  2. 关闭所有Visual Studio实例,删除AAD\xxxxx,然后清除DevOps缓存%LOCALAPPDATA%\.IdentityService

  3. 为此组织/项目创建一个新的工作区,以查看结果如何。

版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 dio@foxmail.com 举报,一经查实,本站将立刻删除。

相关推荐


Selenium Web驱动程序和Java。元素在(x,y)点处不可单击。其他元素将获得点击?
Python-如何使用点“。” 访问字典成员?
Java 字符串是不可变的。到底是什么意思?
Java中的“ final”关键字如何工作?(我仍然可以修改对象。)
“loop:”在Java代码中。这是什么,为什么要编译?
java.lang.ClassNotFoundException:sun.jdbc.odbc.JdbcOdbcDriver发生异常。为什么?
这是用Java进行XML解析的最佳库。
Java的PriorityQueue的内置迭代器不会以任何特定顺序遍历数据结构。为什么?
如何在Java中聆听按键时移动图像。
Java“Program to an interface”。这是什么意思?
Java在半透明框架/面板/组件上重新绘画。
Java“ Class.forName()”和“ Class.forName()。newInstance()”之间有什么区别?
在此环境中不提供编译器。也许是在JRE而不是JDK上运行?
Java用相同的方法在一个类中实现两个接口。哪种接口方法被覆盖?
Java 什么是Runtime.getRuntime()。totalMemory()和freeMemory()?
java.library.path中的java.lang.UnsatisfiedLinkError否*****。dll
JavaFX“位置是必需的。” 即使在同一包装中
Java 导入两个具有相同名称的类。怎么处理?
Java 是否应该在HttpServletResponse.getOutputStream()/。getWriter()上调用.close()?
Java RegEx元字符(。)和普通点?