Jenkins构建 netcore5.0 项目时出现NU3028/NU3037错误的解决方案
生活随笔
收集整理的這篇文章主要介紹了
Jenkins构建 netcore5.0 项目时出现NU3028/NU3037错误的解决方案
小編覺(jué)得挺不錯(cuò)的,現(xiàn)在分享給大家,幫大家做個(gè)參考.
我在使用Jenkins自動(dòng)化部署項(xiàng)目的時(shí)候,出現(xiàn)了如下的錯(cuò)誤
error NU3028: Package 'System.IO.Compression 4.3.0' from source 'https://api.nuget.org/v3/index.json': The repository primary signature's timestamp found a chain building issue: UntrustedRoot: self signed certificate in certificate chain [/var/jenkins_home/workspace/BiliFor/BiliFor.sln] /var/jenkins_home/workspace/BiliFor/BiliFor.Repository/BiliFor.Repository.csproj : error NU3037: Package 'System.IO.Compression 4.3.0' from source 'https://api.nuget.org/v3/index.json': The repository primary signature validity period has expired. [/var/jenkins_home/workspace/BiliFor/BiliFor.sln] /var/jenkins_home/workspace/BiliFor/BiliFor.Tasks/BiliFor.Tasks.csproj : error NU3028: Package 'Serilog.Sinks.File 4.1.0' from source 'https://api.nuget.org/v3/index.json': The repository primary signature's timestamp found a chain building issue: UntrustedRoot: self signed certificate in certificate chain [/var/jenkins_home/workspace/BiliFor/BiliFor.sln] /var/jenkins_home/workspace/BiliFor/BiliFor.Tasks/BiliFor.Tasks.csproj : error NU3037: Package 'Serilog.Sinks.File 4.1.0' from source 'https://api.nuget.org/v3/index.json': The repository primary signature validity period has expired. [/var/jenkins_home/workspace/BiliFor/BiliFor.sln] /var/jenkins_home/workspace/BiliFor/BiliFor.Common/BiliFor.Common.csproj : error NU3028: Package 'Microsoft.Extensions.Configuration 2.1.0' from source 'https://api.nuget.org/v3/index.json': The author primary signature's timestamp found a chain building issue: UntrustedRoot: self signed certificate in certificate chain [/var/jenkins_home/workspace/BiliFor/BiliFor.sln] /var/jenkins_home/workspace/BiliFor/BiliFor.Common/BiliFor.Common.csproj : error NU3037: Package 'Microsoft.Extensions.Configuration 2.1.0' from source 'https://api.nuget.org/v3/index.json': The author primary signature validity period has expired. [/var/jenkins_home/workspace/BiliFor/BiliFor.sln] /var/jenkins_home/workspace/BiliFor/BiliFor.Common/BiliFor.Common.csproj : error NU3028: Package 'Microsoft.Extensions.Configuration 2.1.0' from source 'https://api.nuget.org/v3/index.json': The repository countersignature's timestamp found a chain building issue: UntrustedRoot: self signed certificate in certificate chain [/var/jenkins_home/workspace/BiliFor/BiliFor.sln] /var/jenkins_home/workspace/BiliFor/BiliFor.Common/BiliFor.Common.csproj : error NU3037: Package 'Microsoft.Extensions.Configuration 2.1.0' from source 'https://api.nuget.org/v3/index.json': The repository countersignature validity period has expired. [/var/jenkins_home/workspace/BiliFor/BiliFor.sln]查詢(xún)了很多帖子最后發(fā)現(xiàn)是微軟沒(méi)有通過(guò)認(rèn)證不允許拉取的問(wèn)題
我們通過(guò)命令進(jìn)入到j(luò)enkins鏡像
docker exec -it jenkins容器id /bin/sh?
然后執(zhí)行
curl -o /usr/local/share/ca-certificates/verisign.crt -SsL https://crt.sh/?d=1039083 && update-ca-certificates完成后我們重新去構(gòu)建項(xiàng)目
?
此時(shí)已經(jīng)沒(méi)有報(bào)錯(cuò)了
總結(jié)
以上是生活随笔為你收集整理的Jenkins构建 netcore5.0 项目时出现NU3028/NU3037错误的解决方案的全部?jī)?nèi)容,希望文章能夠幫你解決所遇到的問(wèn)題。
- 上一篇: 数独游戏项目报告
- 下一篇: 苹果iOS设备解锁软件:iToolab