2

我的团队服务构建定义中有一个“Azure 文件复制”任务(之前是 Visual Studio Online)。每当我运行它时,我都会收到“拒绝访问”错误。我一直在尝试解决这个问题几个小时,但没有运气。

Copy started for machine: 'MACHINE NAME'
Copy status for machine 'MACHINE NAME' : 'Failed'
Connecting to remote server [IP ADDRESS] failed with the following error message : Access is denied. For more information, see the about_Remote_Troubleshooting Help topic.To fix WinRM connection related issues, select the 'Enable Copy Prerequisites' option in the task. If set already, and the target Virtual Machines are backed by a Load balancer, ensure Inbound NAT rules are configured for target port (5986). Applicable only for ARM VMs. For more info please refer to http://aka.ms/azurefilecopyreadme
******************************************************************************
Finishing task: AzureFileCopy
******************************************************************************
Task AzureFileCopy failed. This caused the job to fail. Look at the logs for the task for more details.
******************************************************************************
Finishing Build
******************************************************************************

我尝试了以下方法:

  • 构建任务上的“启用复制先决条件”复选框
  • 使用 PSSession -ShowSecurityDescriptorUI 将用户帐户直接分配给具有“完全控制”权限的 Microsoft.Powershell
  • 将计算机添加到 TrustedHosts 列表
  • 确保必要的端口畅通(入站和出站)

考虑到这是一个 Microsoft SaaS 产品,只使用 Microsoft Azure 架构连接到标准 Azure VM,我很惊讶这是如此困难。我一定错过了一些简单的东西!

提前感谢您的任何建议。

4

1 回答 1

0

我犯了使用 builtin\administrator 作为用户名的错误,但是在调试了几个小时后,你得到了同样的错误,我发现这是一个 UPN,并且不允许。我将其更改为 .\administrator 并且有效!

还请查看此站点以进行故障排除,它确实详细介绍了一些事情:http ://www.hurryupandwait.io/blog/understanding-and-troubleshooting-winrm-connection-and-authentication-a-thrill-seekers - 冒险指南

于 2016-07-21T12:42:34.300 回答