Closed PalmEmanuel closed 1 year ago
Thanks @PalmEmanuel for the bug report! We will need to support additional credential types for Publish...the Credential Persistence feature is specific to read access, however it is not nearly as useful if publish functionality isnt possible 😄
@PalmEmanuel - Try registering your PSRepository w/ a v2 URL
SourceLocation:
https://pkgs.dev.azure.com/<org>/<project>/_packaging/MyFeed/nuget/v2
PublishLocation/ScriptPublishLocation:
https://pkgs.dev.azure.com/<org>/<project>/_packaging/MyFeed/nuget/v2/
It's maddening, I found it only after banging my head on it for a couple days and buried in various blog posts/github issues like this, but (for me) it works.
@PalmEmanuel - Try registering your PSRepository w/ a v2 URL
SourceLocation:
https://pkgs.dev.azure.com/<org>/<project>/_packaging/MyFeed/nuget/v2
PublishLocation/ScriptPublishLocation:
https://pkgs.dev.azure.com/<org>/<project>/_packaging/MyFeed/nuget/v2/
It's maddening, I found it only after banging my head on it for a couple days and buried in various blog posts/github issues like this, but (for me) it works.
That's correct for PowerShellGet 2.* (which I assume you're using since you specify two parameters), but the pre-release version 3 is supposed to support v3 feeds too. Good catch though if someone finds this issue and wants a solution for the current release 👍
Whoops @PalmEmanuel , you're correct, sorry I missed that rather important detail.
@SydneyhSmith - the not-well-documented and difficulty of publishing modules to a custom Azure DevOps artifacts feed is an ongoing issue. Please consider making Powershell(Get) a first-class citizen in the Artifacts "Connect to feed" page (alongside Nuget/Visual Studio/Dotnet), and thoroughly test the documentation/steps to allow Register-PSResourceRepository
and Publish-PSResource
to work with AzDOS artifact feeds, preferably with multiple authentication options, including user Credentials, PATs, webflow, etc.
I am having the same problem while trying to use the NuGet package registry in GitLab. GitLab does not support v2.
I'm experiencing the same problem trying to use AWS's CodeArtifact which only supports v3.
Resolved with PR #993
Prerequisites
Steps to reproduce
I'm having trouble publishing a module to an Azure Artifacts feed. I've tried various combinations of authentication, but I end up with the error
Publish-PSResource: Unable to load the service index for source https://pkgs.dev.azure.com/<org>/<project>/_packaging/MyFeed/nuget/v3/index.json.
.I've tried both with the
-Credential
parameter onPublish-PSResource
and with-CredentialInfo
onRegister-PSResourceRepository
as specified in the blog post, but I'm starting to think that Azure Artifacts is a different case since it does not use an API key.I expected it to work with 3.0-beta14 and the credential / authentication improvements, is it not supported yet in PowerShellGet 3.0?
Expected behavior
Actual behavior
Error details
Environment data
Visuals
No response