【发布时间】:2014-12-22 17:09:08
【问题描述】:
我正在尝试将 Cruise control 1.8.5 配置为连接到 Visual Studio Online 以获取构建和运行测试的源代码,但是无论我做什么,我总是收到错误“TF30063: You are not authorized”
根据here 的答案之一,我已经将 tf.exe 和所需的 DLL 复制到构建机器上(如果可能,我宁愿不在构建机器上安装 VS2013,这只是一个概念证明)。
我已根据 here 启用替代凭据
这是 cc.net 配置的一部分 - 方括号中的所有内容都经过双重检查:
<sourcecontrol type="vsts">
<server>https://[account-name].visualstudio.com/DefaultCollection</server>
<project>$/[proj-name]</project>
<username>[alt-credential-username]</username>
<password>[alt-credential-password]</password>
<executable>[path-to-tf.exe]</executable>
<workspace>[workspace-name]</workspace>
<autoGetSource>true</autoGetSource>
<cleanCopy>true</cleanCopy>
<force>true</force>
<deleteWorkspace>true</deleteWorkspace>
</sourcecontrol>
我已经尝试过我的普通凭据、替代凭据,甚至是 here 中提到的 ##LIVEID##[alt-credential-username]
我总是得到:
ThoughtWorks.CruiseControl.Core.CruiseControlException: TF30063: You are not authorized to access https://[account-name].visualstudio.com/DefaultCollection
请注意,我 能够从构建机器手动连接,例如运行以下成功验证并显示源代码控制下的预期目录:
tf.exe dir /folders /server:https://[account-name].visualstudio.com/DefaultCollection "$/[proj-name]" /login:[alt-credential-username],[alt-credential-password]
(这适用于管理员和非管理员 cmd)
我还尝试运行 this 来获取“服务帐户”,但它在 Windows 7 x64 上崩溃了
我见过this,但是因为我可以使用 cmd/tf.exe 手动连接,所以我假设 tf.exe 现在确实支持替代凭据...
明天我可能会尝试 Team Explorer Everywhere 2013,尽管我宁愿避免这种情况,因为它是基于 Java 的,除了它只是设置中的另一个依赖项/步骤之外,我没有任何问题。
感谢任何提示/建议,因为我现在没有想法!
更新: 按照建议使用提琴手显示以下内容
从命令行获取的tf.exe正在发送两个请求:
1)
https://icb.visualstudio.com/DefaultCollection/VersionControl/v5.0/repository.asmx
皂体:
ReconcileLocalWorkspace [ xmlns=http://schemas.microsoft.com/TeamFoundation/2005/06/VersionControl/ClientServices/03 ]
包含 workspaceName、ownerName、pendingChangeSignature 和 maxClientPathLength 的值
2)
https://icb.visualstudio.com/DefaultCollection/VersionControl/v5.0/repository.asmx
皂体:
Get [ xmlns=http://schemas.microsoft.com/TeamFoundation/2005/06/VersionControl/ClientServices/03 ]
包含 workspaceName、ownerName、requests、maxResults 和 maxClientPathLength 的值
但是 CC 发送了两次这个请求:
https://icb.visualstudio.com/DefaultCollection/Services/v1.0/Registration.asmx
皂体:
GetRegistrationEntries [ xmlns=http://schemas.microsoft.com/TeamFoundation/2005/06/Services/Registration/03 ]
使用 toolId=vstfs
【问题讨论】:
-
有趣!您能否捕获一个提琴手跟踪,看看您的命令行
tf所做的与 CruiseControl 的区别是什么?你能记录下 CruiseControl.NET 插件执行的确切命令吗? -
我在玩耍时意识到尝试命令行(手动)get 会更有意义,看来我需要先创建一个工作区,我做到了并且能够获得最新的。然而,提琴手显示的请求与 CC 发出的请求不同。我已经在上面更新了。
标签: tfs cruisecontrol.net azure-devops