简体   繁体   中英

VSTS dotnet restore corporate (or self-signed) certificate issue

I am trying the dotnet restore command on the build step process. My nuget store is in Artifactory. Despite installing the corporate certificate, i am getting a SSL issue. My VSTS agent is running in a Ubuntu container on kubernetes

Retrying 'FindPackagesByIdAsyncCore' for source 'https://<artifactory url>/nuget/FindPackagesById()?id='Client.HostingStartup'&semVerLevel=2.0.0'.
   The SSL connection could not be established, see inner exception.
   The remote certificate is invalid according to the validation procedure.

System.Net.Http.HttpRequestException: The SSL connection could not be established, see inner exception. ---> System.Security.Authentication.AuthenticationException: The remote certificate is invalid according to the validation procedure.

Do we need to do any addition steps for the VSTS agent to pick up self-signed certificates?

If it is not working by installing the corporate certificate in the ubuntu container which hosts your VSTS agent. You can try below workarounds:

1, Create a Nuget service connection to authenticate Artifactory nuget server.

You can create the service connection by adding a new Credentials for feeds... in the dotnet restore task . See below: Click + New

在此处输入图像描述

Then enter your credentials for Artifactory server. See below screeshot.

在此处输入图像描述

  1. Another possible workaround is creating a Artifactory Service Connection and use Artifactory Nuget task to restore your packages. See Artifactory Azure DevOps Extension for more information.

Install JFrog Artifactory extension to your azure devops organziation. Then add Artifactory Nuget Task in your pipeline to restore your package.

Click + New from Artifactory Nuget task to add an Artifactory service connection.

在此处输入图像描述

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM