PowerShell / PowerShellGet

This module provide functions used with PowerShellGet v3 to provide compatibility with scripts expecting PowerShellGet v2
MIT License
49 stars 13 forks source link

The Signature for <package> is 'NotSigned. #48

Open JustinGrote opened 9 months ago

JustinGrote commented 9 months ago

Prerequisites

Steps to reproduce

Attemping to install module jmg.files from the PowerShell Gallery repository. It failed to install saying it was NotSigned. Module is not signed but also has no indicators that it should be (that I can tell).

The module does have Microsoft.Graph dependencies which may be related?

Expected behavior

Installs the module

Actual behavior

❯ install-module jmg.files
Install-PSResource: The signature for 'JMg.Files' is 'NotSigned.
Install-PSResource: Package(s) 'jmg.files' could not be installed from repository 'PSGallery'.
``

Error details

❯ install-module jmg.files
Install-PSResource: The signature for 'JMg.Files' is 'NotSigned.
Install-PSResource: Package(s) 'jmg.files' could not be installed from repository 'PSGallery'.
``

Environment data

❯ gmo Microsoft.PowerShell.PSResourceGet; $PSVersionTable | Format-Table

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

Name                           Value
----                           -----
PSVersion                      7.3.6
PSEdition                      Core
GitCommitId                    7.3.6
OS                             Microsoft Windows 10.0.23545
Platform                       Win32NT
PSCompatibleVersions           {1.0, 2.0, 3.0, 4.0…}
PSRemotingProtocolVersion      2.3
SerializationVersion           1.1.0.1
WSManStackVersion              3.0


### Visuals

_No response_
SydneyhSmith commented 9 months ago

Thanks @JustinGrote this looks like an issue with the Compat module translating a change in behavior of PSResourceGet, we should turn off publisher checks in compat as this doesn't translate well

wrbst commented 5 months ago

Today I hit the same problem in one Windows 11 VM:

gmo Microsoft.PowerShell.PSResourceGet; $PSVersionTable | Format-Table

ModuleType Version    PreRelease Name                                ExportedCommands
---------- -------    ---------- ----                                ----------------
Binary     1.0.1                 Microsoft.PowerShell.PSResourceGet  {Find-PSResource, Get-InstalledPSResource, Get-PSResourceRepository, Get-PSScriptFileInfo…}

Name                           Value
----                           -----
PSVersion                      7.4.1
PSEdition                      Core
GitCommitId                    7.4.1
OS                             Microsoft Windows 10.0.22631
Platform                       Win32NT
PSCompatibleVersions           {1.0, 2.0, 3.0, 4.0…}
PSRemotingProtocolVersion      2.3
SerializationVersion           1.1.0.1
WSManStackVersion              3.0

As suggested by SydneyhSmith the workaround is to add "-SkipPublisherCheck" as parameter during Install-Module.