尝试在IIS服务器上安装部署代理时出错



我在一个域上有一台服务器IIS,在另一个域中有一台Azure Devops服务器。我试图执行部署组脚本,但我的powershell中有这个问题:

发送请求时出错。连接失败。再做一次或点击Ctrl+C输入url连接

而且我没有代理。

我在powershell administrator中输入了脚本。

$ErrorActionPreference="Stop";If(-NOT ([Security.Principal.WindowsPrincipal][Security.Principal.WindowsIdentity]::GetCurrent() ).IsInRole( [Security.Principal.WindowsBuiltInRole] “Administrator”)){ throw "Run command in an administrator PowerShell prompt"};If($PSVersionTable.PSVersion -lt (New-Object System.Version("3.0"))){ throw "The minimum version of Windows PowerShell that is required by the script (3.0) does not match the currently running version of Windows PowerShell." };If(-NOT (Test-Path $env:SystemDrive'azagent')){mkdir $env:SystemDrive'azagent'}; cd $env:SystemDrive'azagent'; for($i=1; $i -lt 100; $i++){$destFolder="A"+$i.ToString();if(-NOT (Test-Path ($destFolder))){mkdir $destFolder;cd $destFolder;break;}}; $agentZip="$PWDagent.zip";$DefaultProxy=[System.Net.WebRequest]::DefaultWebProxy;$securityProtocol=@();$securityProtocol+=[Net.ServicePointManager]::SecurityProtocol;$securityProtocol+=[Net.SecurityProtocolType]::Tls12;[Net.ServicePointManager]::SecurityProtocol=$securityProtocol;$WebClient=New-Object Net.WebClient; $Uri='https://go.microsoft.com/fwlink/?linkid=2066756';if($DefaultProxy -and (-not $DefaultProxy.IsBypassed($Uri))){$WebClient.Proxy= New-Object Net.WebProxy($DefaultProxy.GetProxy($Uri).OriginalString, $True);}; $WebClient.DownloadFile($Uri, $agentZip);Add-Type -AssemblyName System.IO.Compression.FileSystem;[System.IO.Compression.ZipFile]::ExtractToDirectory( $agentZip, "$PWD");.config.cmd --deploymentgroup --deploymentgroupname "Careline deployment dev preprod" --agent $env:COMPUTERNAME --runasservice --work '_work' --url 'https://mydomain:8080/tfs/' --collectionname 'Exelus' --projectname 'EXT-LinkCare' --auth Integrated; Remove-Item $agentZip;

我曾经:-集成认证,-Alt身份验证-PAT认证

我想看看港口,但找不到你知道吗?

目前我知道在另一个服务器和另一个域中安装代理需要使用HTTPS。我试着在http中做这件事。真正的问题是ouazuredevops服务器只有http绑定。因此,我们将打开一些端口,并在azure devops服务器中创建https绑定。这将纠正我们当前的问题。小心默认安装。

最新更新