错误内容:
Determining projects to restore...
/usr/share/dotnet/sdk/5.0.402/NuGet.targets(131,5): error : Unable to load the service index for source https://api.nuget.org/v3/index.json. [/var/lib/jenkins/workspace/Pro-SeeSharper.Desk/SeeSharper.Desk/SeeSharper.Desk.Web.Entry/SeeSharper.Desk.Web.Entry.csproj]
/usr/share/dotnet/sdk/5.0.402/NuGet.targets(131,5): error : The SSL connection could not be established, see inner exception. [/var/lib/jenkins/workspace/Pro-SeeSharper.Desk/SeeSharper.Desk/SeeSharper.Desk.Web.Entry/SeeSharper.Desk.Web.Entry.csproj]
/usr/share/dotnet/sdk/5.0.402/NuGet.targets(131,5): error : The remote certificate is invalid because of errors in the certificate chain: UntrustedRoot [/var/lib/jenkins/workspace/Pro-SeeSharper.Desk/SeeSharper.Desk/SeeSharper.Desk.Web.Entry/SeeSharper.Desk.Web.Entry.csproj]
需要安装和信任本地证书
cp /etc/pki/tls/cert.pem /usr/local/openssl/
dotnet dev-certs https --clean
dotnet dev-certs https --trust