cmd - tf.exe 提示 "TF30063: You are not authorized to access "

标签 cmd tfs azure-devops

我正在尝试使用以下命令获取工作区列表:

tf workspaces /collection:url /computer:* /owner:* /format:xml > workspacesxml.xml

我在哪里更换 url使用我的组织帐户的 Azure DevOps URL。

问题是它提示:

TF30063: You are not authorized to access



我已经清除了 Windows 凭据,重新启动并重试,但没有成功。使用 /login:username,password不是一个选项,因为我启用了 2FA。

如何重新登录命令行 (CMD) 或注销 TF.exe?

最佳答案

您的错误显然是无权连接远程 url。如果它没有缓存在本地,则需要在命令行中指定包含的身份验证。

根据您的描述the Azure DevOps URL of my organization account.看来您使用的是 Azure DevOps 服务,而不是本地 TFS。平时/登录 选项可用于本地 TFS,我们使用 /登录 选项指定运行命令的 Team Foundation Server 用户帐户。

如果要在 Azure DevOps 服务上使用 tf.exe,则需要 使用 PAT token .命令行是:

tf workspaces /collection:https://xxxx.visualstudio.com /login:PATtoken

添加截图:

enter image description here

使用个人访问 token (PAT) 的详细信息 是备用密码 可用于在 Azure DevOps 中进行身份验证。使用时,只需将用户名留空并使用PAT token 输入密码即可。

使用时请导航至https://tfsurl/{teamprojectcollection}/_usersSettings/tokens ,并确保您的 PAT 仍在有效期内。如果没有,请单击“新 token ”按钮创建新 token 。

更多详情请查看我们的官方链接-- Authenticate access with personal access tokens

关于cmd - tf.exe 提示 "TF30063: You are not authorized to access ",我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/58609089/

相关文章:

azure - 只要主分支发生变化,DevOps Pipeline 就会运行,而不是按照期望的时间表运行

azure - 在 Azure Devops SSH 任务中运行 `sudo` 命令的安全方法

docker - 将 JMeter 插件与 justb4/jmeter Docker 镜像一起使用会导致错误

batch-file - 批处理 : preventing someone from using CTRL c or CTRL BREAK to bypass my password script

tfs - ClickOnce 通过 TFS 和发布管理

c# - VssResourceNotFoundException : API resource location <GUID> is not registered on {tfs url} - c#

tfs - 如何查询带有或不带有标签的 TFS 工作项

batch-file - 在批处理文件/cmd文件中自动输入密码

windows - 批处理文件 : List all files in a directory with relative paths

windows - 为windows8中的应用程序添加dokey