我的团队服务构建定义中有一个“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,我很惊讶这是如此困难。我一定错过了一些简单的东西!
提前感谢您的任何建议。