Open bateskevin opened 9 months ago
Maybe we need to force the repository type:
Set-psresourceRepository -name escdev2 -ApiVersion 'nugetServer'
Thanks @bateskevin does your repository have a uri that you can provide with an index.json? something like this https://learn.microsoft.com/en-us/powershell/gallery/powershellget/supported-repositories?view=powershellget-3.x#jfrog-artifactory
Hey @SydneyhSmith, thanks for the response. I believe our repositories are not reachable via that link structure. We are using an on-premise artifactory instance and we use the following structure:
https://artifactory.company.com/artifactory/api/nuget/repositoryname/
With PowershellGet this works without any issues.
I just read the docs you linked and I have to say I think it will be difficult to move on towards PowershellResourceGet until basic functionality that was present in PowershellGet is supported in PowershellResourceGet. For example searching a repository with wildcards is not supported in the new version, or as it seems searching for DSCResources by name.
I would have thought that PowershellResourceGet is mostly a "syntax" change regarding the userexpirience. It seems though that we did loose quite a lot of flexibility on the Userend.
Btw. I love the changes you guys did. i think the commandlets of the new Module are more intuitive to use, but details like wildcard search and these things matter a lot if you work with this on a daily basis.
Are you guys planning on fixing these open points? Gotta give it to you, you have everything documented which is nice :)
Short update from my side, in case somebody else faces the same issue.
I had contact with the team who manages our on premise artifactory instances and they could provide me with the link I needed to use.
For me the structure of the link that is working looks like this:
https://artifactory.company.com/artifactory/api/nuget/v3/repositoryname/index.json
Like this I can list/install modules after registering the PSResourceRepository.
I imagine there is a reason why you guys excluded wildcard searches from this repository type (Most likely something on artifactory side?). I think this would give a lot of value again tho, since this for me is core functionality of PowershellGet that I believe should be taken over to PSResourceGet.
I ran into the same issue as described here, while following this guide:
https://devblogs.microsoft.com/powershell/psresourceget-is-generally-available/
changing to https://artifactory.company.com/artifactory/api/nuget/v3/repositoryname/index.json
works, to some degree, however, it seems that dependency resolution is not working for this:
Install-PSResource -Name "PSDemoNoDep"
WARNING: Installing dependencies is not currently supported for V3 server protocol repositories. The package will be installed without installing dependencies.
Is there a way to set it up using protocol V2? (Does V2 even support installing dependencies?)
Best regards, David
I've tried the url that was mentioned above (adding index.json to the end of the path) and now I just get a 405
Find-PSResource: 'Response status code does not indicate success: 405.' Request sent: 'https://ses-artifactory.{company name}.com/artifactory/api/nuget/v3/g4-nuget/index.json'
I'm really new to use artifactory as a package repo for powershell and don't understand anything about the history (PowerShellGet, PSResourceGet, etc). I'm just wondering is there a guide somewhere that discusses how any of this is supposed to work with non-PSGallery repos?
I've tried v2 paths, v3 paths, updated various modules (the two mentioned above) and can't find anyway to get powershell to recognize and work with an artifctory nuget feed.
UPDATE: It finally dawned on me to uninstall the forced latest prerelease of PSResourceGet and uninstall PowerShellGet (it appears PowerShell core comes with an older version of PowerShellGet). These were things I installed as I read other issues say how to get this all to work.
Based on comments in this issue and other issues that state it used to work to be able to use artifactory as a ps repository. And JFrog has a support document on how to set it up (that seems old). So I decided I just need to get back to the old versions of everything and and old URL in artifactory (not a v3 url)
So using 2.2.5 of PowerShellGEt, and this support document https://jfrog.com/help/r/how-to-work-with-powershell-modules-and-nuget-repository/how-to-work-with-powershell-modules-and-a-nuget-repository I was able get it to work.
Prerequisites
Steps to reproduce
Hi,
In order to test the module I have installed it and wanted to try to register some repositories and install some modules from our company internal artifactory. We have multiple repositories and I tried with our dev one.
I used the following code to register the ResourceRepository:
The module does not give any feedback when registering the repository:
When I then try to find a module that is listed on our internal repository I get the following error:
Expected behavior