首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >目标机器上的PowerShell在TFS 2018发布管道中失败

目标机器上的PowerShell在TFS 2018发布管道中失败
EN

Stack Overflow用户
提问于 2020-05-04 08:32:36
回答 2查看 731关注 0票数 0

我是TFS2018的新手,我正在尝试配置CI/CD管道。我的构建成功了,在发布管道中,我需要在我的部署服务器上运行powershell脚本,所以我使用了在目标机器上运行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,但仍然存在问题。请提供建议和帮助。

EN

回答 2

Stack Overflow用户

回答已采纳

发布于 2020-05-05 09:53:52

  1. 通过powershell将TFS服务器机器添加到目标计算机中的TrustedHost中。

在此任务中提供的Set-Item WSMan:localhost\client\trustedhosts -value ServerDC

  • Ensure凭据具有管理角色,同时在本例中它们可以访问w.r.to TFS。如果提供的凭据没有TFS管理支持,则任务不能调用代理来触发VisualStudioRemoteDeployer.

票数 0
EN

Stack Overflow用户

发布于 2020-05-04 12:59:38

这就是PowerShell中所谓的双跳问题,通常这意味着您试图以不同的凭据登录到远程计算机,然后使用您的用户运行的凭据。那么,在您的例子中,$(adminUserName)是否与代理相同?如果没有,则可以尝试将该用户更改为与代理相同的用户。如果没有,则需要做更多的工作,然后将机器添加到trustedHost中。在SPN上观看这段视频可能对https://www.youtube.com/watch?v=yFgdPcLOs-g有帮助,下面是关于双跳问题https://learn.microsoft.com/en-us/powershell/scripting/learn/remoting/ps-remoting-second-hop?view=powershell-7的详细说明。

票数 0
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/61588090

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档