我在Azure Pipelines中有一个构建管道失败了。它指出由于证书已过期而无法下载文件。
当前,指定版本3.x
的版本为3.1.201。
如果我明确指定了先前的版本3.1.103
,则该步骤将成功且没有错误。
YAML
steps:
- task: UseDotNet@2
displayName: 'Use .Net Core sdk 3.x'
inputs:
version: 3.x
构建错误
Tool to install: .NET Core sdk version 3.x.
Found version 3.1.201 in channel 3.1 for user specified version spec: 3.x
Version 3.1.201 was not found in cache.
Getting URL to download .NET Core sdk version: 3.1.201.
Detecting OS platform to find correct download package for the OS.
C:\windows\System32\WindowsPowerShell\v1.0\powershell.exe -NoLogo -Sta -NoProfile -NonInteractive -ExecutionPolicy Unrestricted -Command "& 'd:\a\_tasks\UseDotNet_b0ce7256-7898-45d3-9cb5-176b752bfea6\2.165.2\externals\get-os-platform.ps1'"
Primary:win-x64
Detected platform (Primary): win-x64
Downloading: https://download.visualstudio.microsoft.com/download/pr/adeab8b1-1c44-41b2-b12a-156442f307e9/65ebf805366410c63edeb06e53959383/dotnet-sdk-3.1.201-win-x64.zip
##[error]Failed while installing version: 3.1.201 at path: C:/hostedtoolcache/windows/dotnet with error: Could not download installation package from this URL: https://download.visualstudio.microsoft.com/download/pr/adeab8b1-1c44-41b2-b12a-156442f307e9/65ebf805366410c63edeb06e53959383/dotnet-sdk-3.1.201-win-x64.zip Error: Error: certificate has expired
Finishing: Use .Net Core sdk 3.x
答案 0 :(得分:2)
Azure DevOps使用dotnet核心下载失败:证书错误
AFAIK,当我们使用此UseDotNet@2
任务时,这不涉及任何客户端证书。
因此,证书应与SDK本身更相关,应由SDK提供者全面更新。
此外,其他成员最近对同一问题做出了反应,并且该问题不再存在。
Expired certificate on Dotnet install
尝试检查是否仍然存在此问题。另外,您可以尝试在该任务中明确指定先前的版本3.1.201
。
希望获得帮助。