Ошибка загрузки пакета Octopus: URI части недействителен в соответствии с правилами, определенными в спецификации Open Packaging Conventions

Я загрузил пакет в наш канал nuget, и у меня есть задача развертывания пакета в нашем процессе, но на этапе получения пакетов происходит сбой со следующей ошибкой:

Downloading NuGet package <Package> from feed: 'http://feed/nuget/Default'
15:11:42Error
Unable to download package: Part URI is not valid per rules defined in the Open Packaging Conventions specification.
15:11:42Error
Failed to download package <Package> from feed: 'http://feed/nuget/Default'
15:11:42Error
System.Exception: The package could not be downloaded from NuGet. If you are getting a package verification error, try switching to a Windows File Share package repository to see if that helps.
15:11:42Error
   at Calamari.Integration.PackageDownload.PackageDownloader.AttemptToDownload(String packageId, SemanticVersion version, Uri feedUri, String cacheDirectory, String& downloadedTo, IPackage& downloaded) in Z:\BuildAgent\work\14ffc968155e4956\source\Calamari\Integration\PackageDownload\PackageDownloader.cs:line 146
15:11:42Error
   at Calamari.Integration.PackageDownload.PackageDownloader.DownloadPackage(String packageId, SemanticVersion version, String feedId, Uri feedUri, Boolean forcePackageDownload, String& downloadedTo, String& hash, Int64& size) in Z:\BuildAgent\work\14ffc968155e4956\source\Calamari\Integration\PackageDownload\PackageDownloader.cs:line 45
15:11:42Error
   at Calamari.Commands.DownloadPackageCommand.Execute(String[] commandLineArguments) in Z:\BuildAgent\work\14ffc968155e4956\source\Calamari\Commands\DownloadPackageCommand.cs:line 59

Глядя на необработанный журнал, я вижу:

                |       Running: Download package Sitecore version 8.2.2 from 

http://feed/nuget/Default
14:09:33   Verbose  |         Octopus Deploy: Calamari version 3.3.32+Branch.master.Sha.d4b60a3db38fae9b6afdec2d088705a7689dfb08
14:09:33   Verbose  |         Name                           Value
14:09:33   Verbose  |         ----                           -----
14:09:33   Verbose  |         PSVersion                      5.0.10586.117
14:09:33   Verbose  |         PSCompatibleVersions           {1.0, 2.0, 3.0, 4.0...}
14:09:33   Verbose  |         BuildVersion                   10.0.10586.117
14:09:33   Verbose  |         CLRVersion                     4.0.30319.42000
14:09:33   Verbose  |         WSManStackVersion              3.0
14:09:33   Verbose  |         PSRemotingProtocolVersion      2.3
14:09:33   Verbose  |         SerializationVersion           1.1.0.1
14:09:33   Verbose  |         Octopus Deploy: Calamari version 3.3.32+Branch.master.Sha.d4b60a3db38fae9b6afdec2d088705a7689dfb08
14:09:33   Verbose  |         Checking package cache for package <Package>
14:09:33   Info     |         Downloading NuGet package <Package> from feed: 'http://feed/nuget/Default'
14:09:33   Verbose  |         Downloaded package will be stored in: 'C:\Octopus\Files\feeds-'
14:09:33   Verbose  |         Finding package (attempt 1 of 5)
14:09:33   Verbose  |         Found package Sitecore version 8.2.2
14:09:33   Verbose  |         Downloading to: C:\Octopus\Files\feeds-\<Package>_E5E7A496910166469362029C4D3EBA0F.nupkg
14:09:33   Verbose  |         A direct download is possible; bypassing the NuGet machine cache
14:09:33   Verbose  |         Attempt 1 of 5: Unable to download package: Part URI is not valid per rules defined in the Open Packaging Conventions specification.
14:09:33   Verbose  |         Finding package (attempt 2 of 5)
14:09:33   Verbose  |         Found package Sitecore version 8.2.2
14:09:33   Verbose  |         Downloading to: C:\Octopus\Files\feeds-\<Package>_F85FDFD2EF823C41BDBB00C7F0EB1542.nupkg
14:09:33   Verbose  |         A direct download is possible; bypassing the NuGet machine cache
14:10:12   Verbose  |         Attempt 2 of 5: Unable to download package: Part URI is not valid per rules defined in the Open Packaging Conventions specification.
14:10:17   Verbose  |         Finding package (attempt 3 of 5)
14:10:17   Verbose  |         Found package Sitecore version 8.2.2
14:10:17   Verbose  |         Downloading to: C:\Octopus\Files\feeds-\<Package>_15F1514B91F27942A9EF470B11369AA7.nupkg
14:10:17   Verbose  |         A direct download is possible; bypassing the NuGet machine cache
14:10:47   Verbose  |         Attempt 3 of 5: Unable to download package: Part URI is not valid per rules defined in the Open Packaging Conventions specification.
14:10:52   Verbose  |         Finding package (attempt 4 of 5)
14:10:52   Verbose  |         Found package Sitecore version 8.2.2
14:10:52   Verbose  |         Downloading to: C:\Octopus\Files\feeds-\<Package>_3A117290B32E084485CBC25FA4D17611.nupkg
14:10:52   Verbose  |         A direct download is possible; bypassing the NuGet machine cache
14:11:32   Verbose  |         Attempt 4 of 5: Unable to download package: Part URI is not valid per rules defined in the Open Packaging Conventions specification.
14:11:32   Verbose  |         Finding package (attempt 5 of 5)
14:11:32   Verbose  |         Found package Sitecore version 8.2.2
14:11:32   Verbose  |         Downloading to: C:\Octopus\Files\feeds-\<Package>_E78C9F7C3950E6449F88B98A13C966A2.nupkg
14:11:32   Verbose  |         A direct download is possible; bypassing the NuGet machine cache
14:11:37   Verbose  |         Attempt 5 of 5: Unable to download package: Part URI is not valid per rules defined in the Open Packaging Conventions specification.
14:11:42   Error    |         Unable to download package: Part URI is not valid per rules defined in the Open Packaging Conventions specification.
14:11:42   Error    |         Failed to download package <Package> from feed: 'http://feed/nuget/Default'
14:11:42   Error    |         System.Exception: The package could not be downloaded from NuGet. If you are getting a package verification error, try switching to a Windows File Share package repository to see if that helps.
14:11:42   Error    |         at Calamari.Integration.PackageDownload.PackageDownloader.AttemptToDownload(String packageId, SemanticVersion version, Uri feedUri, String cacheDirectory, String& downloadedTo, IPackage& downloaded) in Z:\BuildAgent\work\14ffc968155e4956\source\Calamari\Integration\PackageDownload\PackageDownloader.cs:line 146
14:11:42   Error    |         at Calamari.Integration.PackageDownload.PackageDownloader.DownloadPackage(String packageId, SemanticVersion version, String feedId, Uri feedUri, Boolean forcePackageDownload, String& downloadedTo, String& hash, Int64& size) in Z:\BuildAgent\work\14ffc968155e4956\source\Calamari\Integration\PackageDownload\PackageDownloader.cs:line 45
14:11:42   Error    |         at Calamari.Commands.DownloadPackageCommand.Execute(String[] commandLineArguments) in Z:\BuildAgent\work\14ffc968155e4956\source\Calamari\Commands\DownloadPackageCommand.cs:line 59

Если я вхожу в щупальце, я вижу, что пакет загружается несколько раз.

Что вызывает ошибку?


person David Masters    schedule 18.07.2018    source источник
comment
Работал ли он когда-нибудь с этим пакетом? Может быть, с названием вашего пакета? Как показано ниже? help.octopusdeploy.com/discussions/problems/   -  person Alex M    schedule 19.07.2018


Ответы (1)


В конечном итоге это стало проблемой совместимости с версией NuGet (последней), которую я использовал для создания пакетов, и версией Octopus (очень старой).

Чтобы решить эту проблему, я загрузил старую 2.8.6 версию NuGet и использовал команду pack для создания пакетов. Это решило проблему.

person David Masters    schedule 21.09.2018