-
Notifications
You must be signed in to change notification settings - Fork 191
Open
Description
ITNOA
Hi
I have PowerShell 7.5.4, when I run below command
Get-PSRepository
Name InstallationPolicy SourceLocation
---- ------------------ --------------
PSGallery Untrusted https://www.powershellgallery.com/api/v2as I know https://www.powershellgallery.com/api/v2 is deprecated, and if I try to install some package on PSGallery I got below error
WARNING: Unable to resolve package source 'https://www.powershellgallery.com/api/v2'.So I have to use v3 (based on Microsoft Community answer, so I use below command
Unregister-PSRepository -Name 'PSGallery'
Register-PSRepository -Default -SourceLocation 'https://www.powershellgallery.com/api/v3' -InstallationPolicy TrustedBut I got below error
Register-PSRepository: Use 'Register-PSRepository -Default' to register the PSGallery repository.But as I know, Register-PSRepository -Default does not register correct source location
So I do not know how to resolve this problem?
One strange thing is for example if I try to install Terminal-Icons with Install-Module I got below error
Install-Module -Name Terminal-Icons -Repository PSGallery
WARNING: Unable to resolve package source 'https://www.powershellgallery.com/api/v2'.
Install-Package: No match was found for the specified search criteria and module name 'Terminal-Icons'. Try Get-PSRepository to see all available registered module repositories.but I try to install above module with Install-PSResource everything work correctly as below
Install-PSResource -Name Terminal-Icons -Repository PSGalleryI ask similar question on https://stackoverflow.com/q/79879316/1539100
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels