Skip to content

Artifactory nuget repositories not supported  #1404

Open
@bateskevin

Description

@bateskevin

Prerequisites

  • Write a descriptive title.
  • Make sure you are able to repro it on the latest released version
  • Search the existing issues.

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:

Register-PSResourceRepository -name dev -Uri https://companyxyzinternalartifactory.com/artifactory/api/nuget/DevRepository/ -Trusted -Priority 1

The module does not give any feedback when registering the repository:
2023-09-13_07-25-34

When I then try to find a module that is listed on our internal repository I get the following error:

Find-PSResource -Name PSHTML -Repository dev
2023-09-13_07-27-26

Expected behavior

It should find the PSResource just like it finds it on the Powershell Gallery:


PS /Users/kevinbates/Code> Find-PSResource -Name PSHTML -Repository PSGallery

Name   Version Prerelease Repository Description
----   ------- ---------- ---------- -----------
PSHTML 0.8.2              PSGallery  Cross platform PowerShell module to generate HTML markup language and create awesome web pages!


### Actual behavior

```console
It does not find the PSResource because the repositorytype is not supported:


PS /Users/kevinbates/Code> Find-PSResource -Name PSHTML -Repository dev                                                                                Find-PSResource: Repository 'dev' is not a known repository type that is supported. Please file an issue for support at https://github.com/PowerShell/PSResourceGet/issues


### Error details

```console
PS /Users/kevinbates/Code> get-error               

Exception             : 
    Type        : System.Management.Automation.PSInvalidOperationException
    ErrorRecord : 
        Exception             : 
            Type    : System.Management.Automation.ParentContainsErrorRecordException
            Message : Repository 'dev' is not a known repository type that is supported. Please file an issue for support at 
https://github.com/PowerShell/PSResourceGet/issues
            HResult : -2146233087
        CategoryInfo          : InvalidOperation: (:) [], ParentContainsErrorRecordException
        FullyQualifiedErrorId : InvalidOperation
    Message     : Repository 'dev' is not a known repository type that is supported. Please file an issue for support at 
https://github.com/PowerShell/PSResourceGet/issues
    HResult     : -2146233079
TargetObject          : Microsoft.PowerShell.PSResourceGet.Cmdlets.FindHelper
CategoryInfo          : InvalidArgument: (Microsoft.PowerShel….Cmdlets.FindHelper:FindHelper) [Find-PSResource], PSInvalidOperationException
FullyQualifiedErrorId : RepositoryApiVersionUnknown,Microsoft.PowerShell.PSResourceGet.Cmdlets.FindPSResource
InvocationInfo        : 
    MyCommand        : Find-PSResource
    ScriptLineNumber : 1
    OffsetInLine     : 1
    HistoryId        : 47
    Line             : Find-PSResource -Name PSHTML -Repository dev
    PositionMessage  : At line:1 char:1
                       + Find-PSResource -Name PSHTML -Repository dev
                       + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    InvocationName   : Find-PSResource
    CommandOrigin    : Internal
ScriptStackTrace      : at <ScriptBlock>, <No file>: line 1
PipelineIterationInfo : 


### Environment data

```powershell
Get-Module Microsoft.PowerShell.PSResourceGet; $PSVersionTable

ModuleType Version    PreRelease Name                                ExportedCommands
---------- -------    ---------- ----                                ----------------
Binary     0.9.0      rc1        Microsoft.PowerShell.PSResourceGet  {Find-PSResource, Get-InstalledPSResource, Get-PSResourceRepository, Get-PSScriptFi…

Key   : PSVersion
Value : 7.3.6
Name  : PSVersion


Key   : PSEdition
Value : Core
Name  : PSEdition


Key   : GitCommitId
Value : 7.3.6
Name  : GitCommitId


Key   : OS
Value : Darwin 22.3.0 Darwin Kernel Version 22.3.0: Mon Jan 30 20:39:46 PST 2023; root:xnu-8792.81.3~2/RELEASE_ARM64_T6020
Name  : OS


Key   : Platform
Value : Unix
Name  : Platform


Key   : PSCompatibleVersions
Value : {1.0, 2.0, 3.0, 4.0…}
Name  : PSCompatibleVersions


Key   : PSRemotingProtocolVersion
Value : 2.3
Name  : PSRemotingProtocolVersion


Key   : SerializationVersion
Value : 1.1.0.1
Name  : SerializationVersion


Key   : WSManStackVersion
Value : 3.0
Name  : WSManStackVersion


### Visuals

_No response_

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions