我正在使用TFS预览(团队基础服务)与我的Visual Studio 2012项目之一。我的大多数项目都使用本地TFS服务器。当我在使用TFS预览后使用我的本地TFS并返回使用TFS预览时,我得到这个错误:

TF30063:您没有权限访问MyProject\DefaultCollection。

如果我去团队→断开TFS,然后再次连接到TFS预览,我能够看到一个“加载标识符”加载屏幕出现,但最后我不能输入我的凭据到TFS预览(我的微软帐户),因此,TF30063错误仍然发生。

我怀疑这与我的微软帐户(即Live ID)有关。我用我在TFS预览中使用的同一个微软帐户登录到Windows。我曾使用其他微软账号登录过其他网站(Windows Development Center, MSDN等),但我验证了如果我注销了这些服务,并使用正确的微软账号重新登录,当我试图从Visual Studio登录TFS预览时,仍然会得到TF30063错误。


当前回答

在VS 2015中,它可以通过 团队浏览器>连接>管理连接 再次选择团队项目。如果VS中存在多个帐户,团队资源管理器会询问使用哪个帐户连接到团队项目。

其他回答

目前的答案都对我不起作用。我在这里找到了解决办法。

The issue was that my previous credentials were cached by the Windows OS for the TFS server. While some people might have had success wiping out the AppData temp folders, that is not required. You need to update the credentials through Control Panel on the Windows OS. For me on Windows 10: Close VS. Go to Control Panel (with small icon view)-->User Accounts-->Manage your credentials (on the left column)-->Select "Windows Credentials"-->Scroll down to the "Generic Credentials" section and look for your TFS server connection. Expand the pull down and click "Edit". Enter in new network password. Reopen VS and everything should work again.

这种情况经常发生在我身上,上面描述的解决方案没有一个每次都有效。 大多数情况下,使用“连接到团队项目按钮”的解决方案工作正常,但当我这样做时,有时什么也没有发生。

其他时候,我只能使用Visual Studio内置浏览器(Ctrl+Alt+R)或Internet Explorer重新登录http://tfs.visualstudio.com。

(正如在其他一些回答中所建议的那样,对我来说,这不是由多个live-id引起的)

同样的问题没有解决后,尝试所有上述解决方案为我,然后下面的命令解决问题。在windows上打开一个运行命令,复制下面的命令并进行必要的更改,如域\loginname和VS路径

runas /netonly /user:域\登录名"C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\Common7\IDE\devenv.exe"

当我们的IT安全政策迫使我更改密码时,我就遇到了这个问题。密码更改后,当我使用VS2017连接到TFS时,我不再被授权访问我们的TFS服务器并获得TF30063:您没有被授权访问…:8080/tfs错误信息。

但是,如果我使用VS2013连接,我可以毫无问题地连接到服务器,并且使用VS2017拒绝访问的错误也消失了。

只要重新启动visual Studio就可以了。当我这样做的时候,它就像魔法一样有效