【发布时间】:2020-08-18 15:14:27
【问题描述】:
我是 TFS2018 的新手,我正在尝试配置 CI/CD 管道。我的构建成功并且在我的发布管道中,我需要在我的部署服务器上运行 powershell 脚本,因此我在目标机器任务上使用了 RUN PowerShell。我想,正确提供了所有必需的信息并运行了发布,但在此任务中得到了如下错误
Connecting to remote server xxx.xxx.xx.xx failed with the following error message : The WinRM client cannot process the request. Default authentication may be used with an IP address under the following conditions: the transport is HTTPS or the destination is in the TrustedHosts list, and explicit credentials are provided. Use winrm.cmd to configure TrustedHosts. Note that computers in the TrustedHosts list might not be authenticated. For more information on how to set TrustedHosts run the following command: winrm help config. For more information, see the about_Remote_Troubleshooting Help topic.
请在下面找到我的任务配置
我尝试将我的 TFS2018 服务器添加为目标服务器上的trustedHost,但问题仍然存在。请提出建议和帮助。
【问题讨论】:
-
你在目标机器上打开了WinRM端口吗?
-
@Shayki Abramczyk - 我对此不太确定。我在 powershell 中尝试了命令
Configure-SMRemoting.exe -enable,它显示Server Manager Remoting is already enabled。有意义吗? -
根据升级消息`传输是 HTTPS 或目标在 TrustedHosts 列表中,并提供了明确的凭据。`不确定您的情况是否支持 Http。您是否尝试过使用 HTTPS 与目标机器进行通信。有关 HTTP 和 HTTPS 的 WinRM 配置的更多详细信息,请参考此链接:docs.microsoft.com/en-us/azure/devops/pipelines/apps/cd/…
标签: powershell tfs azure-pipelines-release-pipeline