【发布时间】:2020-05-18 12:28:58
【问题描述】:
我试图在 ubuntu 18.04 上构建 dotnet 项目。我有一些 nuget 数据包存储在本地 Azure Devops 服务器存储库中。我配置了 https 和自签名证书。我通过
添加了源dotnet nuget add source https://myurl/nuget/v3/index.json --name Int1 --username myuser --password mypasswd --store-password-in-clear-text --configfile nuget.config
当我尝试执行还原时,出现以下错误:
/usr/share/dotnet/sdk/3.1.201/NuGet.targets(124,5): error : Unable to load the service index for source https://myurl/nuget/v3/index.json. [/home/Frontend/myproject.sln]
/usr/share/dotnet/sdk/3.1.201/NuGet.targets(124,5): error : The SSL connection could not be established, see inner exception. [/home/Frontend/myproject.sln]
/usr/share/dotnet/sdk/3.1.201/NuGet.targets(124,5): error : The remote certificate is invalid according to the validation procedure. [/home/Frontend/myproject.sln]
我将https://myurl/ 放入浏览器,下载.pem 证书,放入/usr/share/ca-certificates/ 并制作dkpg-reconfigure ca-certificates,但仍然报错。
Curl 也不行。
curl: (60) SSL certificate problem: unable to get local issuer certificate
More details here: https://curl.haxx.se/docs/sslcerts.html
curl failed to verify the legitimacy of the server and therefore could not
establish a secure connection to it. To learn more about this situation and
how to fix it, please visit the web page mentioned above.
在 Windows 上,如果我将我的证书作为 root 信任,一切正常。有什么方法可以在 linux 上做同样的事情吗?
【问题讨论】:
-
嗨,您有机会尝试以下解决方案吗?进展如何?
标签: .net ubuntu azure-devops nuget restore