From Artifactory version 6.6.0, when working with a PowerShell client to request a package from a virtual repository (which aggregate a remote repository to https://www.powershellgallery.com) in case there is a latest version of the package like "2.0.0-beta" the request will fail on the client side. for example: https://www.powershellgallery.com/packages/PSReadLine/2.0.0-beta4
In case same request executed directly to the remote repository the latest stable version (e.g "1.2") will be retrieved.
In case the latest version is stable (e.g 1.2) the request will be successful from both virtual and remote repository. for example: https://www.powershellgallery.com/packages/Carbon/2.8.1
Steps to reproduce:
On Artifactory side:
- Artifactory version 6.6.0 and above
- Create a Nuget remote repository to https://www.powershellgallery.com/
- Create a Nuget virtual repository which aggregate the Nuget remote repository
On the PowerShell client side:
Add the Nuget repositories to the PowerShell client:
- Register-PSRepository -Name "art-remote" -SourceLocation "http://localhost:8081/artifactory/api/nuget/powershell-remote" -InstallationPolicy Trusted
- Register-PSRepository -Name "art-virtual" -SourceLocation "http://localhost:8081/artifactory/api/nuget/powershell-virtual" -InstallationPolicy Trusted
Try to $find module via the remote:
Notice it will succeed and retrieve the artifact version.
Try to $find module via the virtual:
Notice the request will fail and no results returned.