The flowing code has been pushed to an Azure DevOps Artifacts Feed:
Pushing the nuget package and downloading work without issues using nuget.exe:
nuget.exe push -Source "cdrtools-artifacts" -ApiKey AzureDevOps schily-cdrtools.3.2.1.nupkg
nuget.exe install -Source "cdrtools-artifacts" schily-cdrtools
However, attempting to register this source with Chocolatey results in a 404 error using either a v2 or v3 nuget registration:
choco source add -n=schily-artifacts `
>> -s="https://flapjacks.pkgs.visualstudio.com/_packaging/schily-artifacts/nuget/v3/index.json" `
>> -u="xxxxxxxx" -p="xxxxxxxxxxx"
Error retrieving packages from source 'https://flapjacks.visualstudio.com/_packaging/schily-artifacts/nuget/v3/index.json':
The remote server returned an error: (404) Not Found.
schily-cdrtools not installed. The package was not found with the source(s) listed.
Source(s): 'https://flapjacks.visualstudio.com/_packaging/schily-artifacts/nuget/v3/index.json'
NOTE: When you specify explicit sources, it overrides default sources.
If the package version is a prerelease and you didn't specify `--pre`,
the package may not be found.
Please see https://chocolatey.org/docs/troubleshooting for more
assistance.
...and the same 404 error when using v2:
choco source add -n=schily-artifacts `
>> -s="https://flapjacks.pkgs.visualstudio.com/_packaging/schily-artifacts/nuget/v2" `
>> -u="xxxxxxxx" -p="xxxxxxx"
Trying to list with the v2 registration comes up with no packages found, however when running choco list with the v3 it comes back with a 404 error.
Finally, trying with Install-Package failes with a credentials issue:
Install-Package schily-cdrtools
WARNING: Cannot access 'https://flapjacks.pkgs.visualstudio.com/_packaging/schily-artifacts/nuget/v3/index.json'. Are you missing 'Credential' parameter in the cmdlet?
Install-Package : No match was found for the specified search criteria and package name 'schily-cdrtools'. Try Get-Packa
geSource to see all available registered package sources.
At line:1 char:1
+ Install-Package schily-cdrtools
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : ObjectNotFound: (Microsoft.PowerShel\u2026lets.InstallPackage:InstallPackage) [Install-Package
], Exception
+ FullyQualifiedErrorId : NoMatchFoundForCriteria,Microsoft.PowerShell.PackageManagement.Cmdlets.InstallPackage
Any ideas no what I'm missing?
I've been using the following as a guide:
https://blog.pauby.com/post/chocolatey-repository-using-azure-devops-artifacts-feed/