将控件巡航到Visual Studio Online,TF30063:您无权 [英] Cruise control to Visual Studio Online, TF30063: You are not authorized

查看:111
本文介绍了将控件巡航到Visual Studio Online,TF30063:您无权的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我试图将Cruise Control 1.8.5配置为连接到Visual Studio Online,以获取源代码来构建和运行测试,但是无论如何我总是会收到错误消息 TF30063:您无权

I am trying to configure Cruise control 1.8.5 to connect to Visual Studio Online to get the source to build and run tests, however whatever I do I always get the error 'TF30063: You are not authorized'

我已按照回答(如果可能的话,我宁愿不将VS2013安装在构建计算机上,这只是概念证明)。

I have copied over tf.exe and required DLLs to the build machine as per one of the answers here (I would rather not install VS2013 on the build machine if possible, this is just a proof of concept at this point).

我已根据此处

这是cc.net配置的一部分-方括号中的所有内容再次检查:

This is part of the cc.net config - everything in square brackets has been double checked:

<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>

我尝试了普通凭据,替代凭据,甚至## LIVEID ## [alt-凭据用户名],此处

I have tried my normal credentials, the alternative credentials, and even ##LIVEID##[alt-credential-username] as mentioned here

我总是得到:

ThoughtWorks.CruiseControl.Core.CruiseControlException: TF30063: You are not authorized to access https://[account-name].visualstudio.com/DefaultCollection

请注意,我能够从构建机器手动连接,例如运行以下命令成功进行身份验证,并在源代码管理下显示预期的目录:

Note that I am able to connect manually from the build machine, e.g. running the following authenticates successfully and displays the expected directories under source control:

tf.exe dir /folders /server:https://[account-name].visualstudio.com/DefaultCollection "$/[proj-name]" /login:[alt-credential-username],[alt-credential-password]

(这适用于管理员和非管理员cmd)

(this works from both admin and non-admin cmd)

我也尝试运行即可获得服务帐户它在Windows 7 x64上对我崩溃

I also tried to run this to get a 'service account' however it crashes for me on Windows 7 x64

我见过,但是由于我可以使用cmd / tf.exe手动连接,因此我假设tf.exe现在确实支持替代凭据...

I have seen this however as I can manually connect using cmd/tf.exe I am assuming that tf.exe now does support alternative credentials...

我明天可能会尝试Team Explorer Everywhere 2013,尽管我宁愿避免这种情况由于它是基于Java的,除了它只是设置中的另一个依赖项/步骤之外,我没有任何问题。

I will probably try Team Explorer Everywhere 2013 tomorrow, although I'd rather avoid this due to it being Java based which I have no problem with apart from it's just another dependency / step in the setup.

任何提示/建议,我都非常感谢

Any tips/suggestions appreciated, as I'm out of ideas at this point!

更新:
按建议使用提琴手将显示以下内容

UPDATE: Using fiddler as suggested shows the following

tf.exe发送两个请求:

tf.exe get from the command line is sending two requests:

1)

https://icb.visualstudio.com/DefaultCollection/VersionControl/v5.0/repository.asmx

肥皂主体:

ReconcileLocalWorkspace [ xmlns=http://schemas.microsoft.com/TeamFoundation/2005/06/VersionControl/ClientServices/03 ]

具有工作区名称,所有者名称,未决更改签名的值和maxClientPathLength

with values for workspaceName, ownerName, pendingChangeSignature and maxClientPathLength

2)

https://icb.visualstudio.com/DefaultCollection/VersionControl/v5.0/repository.asmx

肥皂主体:

Get [ xmlns=http://schemas.microsoft.com/TeamFoundation/2005/06/VersionControl/ClientServices/03 ]

具有工作区名称,所有者名称,请求,maxResults和maxClientPathLength的值

with values for workspaceName, ownerName, requests, maxResults and maxClientPathLength

但是CC两次发送了此请求:

However CC is sending this request twice:

https://icb.visualstudio.com/DefaultCollection/Services/v1.0/Registration.asmx

肥皂体:

GetRegistrationEntries [ xmlns=http://schemas.microsoft.com/TeamFoundation/2005/06/Services/Registration/03 ]

with toolId = vstfs

with toolId=vstfs

推荐答案

简短答案:运行巡航控制.net服务与您用于创建工作区的用户(不是本地系统帐户)相同。

Short answer: Run the cruise control .net service as the same user you used to create the workspace (not the local system account).

详细信息:
我最终获得了巡航控制.net源代码,并附加一个调试器以准确查看tf命令正在生成该错误。

Details: I ended up getting the cruise control .net source, and attaching a debugger to see exactly what tf command was generating the error.

失败的进程信息:

Executable = "...tf.exe"
args = {dir /folders /server:https://[account-name].visualstudio.com/DefaultCollection "$/[proj-name]" /login:[alt-credential-username],[alt-credential-password]}
workingDirectory = "[valid-working-dir]"

手动运行此命令可以正常工作-导致我检查了cc服务属性,这些属性设置为以本地系统帐户身份登录。我将其更新为以与用于创建工作区的Windows用户相同的身份登录,从而解决了该问题。

Running this command manually worked fine - which led me to check the cc service properties, which were set to log on as Local System Account. I updated this to log on as the same (Windows) user that I used to create the workspace and this fixed the problem.

我只能假定tf.exe为

I can only assume that tf.exe is doing something clever with accounts/credentials or maybe it's just that workspaces are tied to particular windows logons?

感谢爱德华建议我摆弄小提琴手。

Thanks to Edward for suggesting I fiddle with fiddler.

这篇关于将控件巡航到Visual Studio Online,TF30063:您无权的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆