Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Pester Update Error: 'CN=Jakub Jareš, O=Jakub Jareš, L=Praha, C=CZ' #2617

Closed
3 tasks done
ElvenSpellmaker opened this issue Feb 6, 2025 · 2 comments
Closed
3 tasks done

Comments

@ElvenSpellmaker
Copy link

ElvenSpellmaker commented Feb 6, 2025

Checklist

What is the issue?

I believe this (see below) has come back, I'm trying to upgrade from 5.4.0, to 5.7.1 and I'm getting the certificate error again.

#2389

Untrusted repository
You are installing the modules from an untrusted repository. If you trust this
repository, change its InstallationPolicy value by running the Set-PSRepository
cmdlet. Are you sure you want to install the modules from 'PSGallery'?
[Y] Yes  [A] Yes to All  [N] No  [L] No to All  [S] Suspend  [?] Help
(default is "N"):y
Install-Package: Authenticode issuer 'CN=Jakub Jareš, O=Jakub Jareš, L=Praha, C=CZ' of the new module
'Pester' with version '5.7.1' from root certificate authority 'CN=DigiCert Trusted
Root G4, OU=www.digicert.com, O=DigiCert Inc, C=US' is not matching with the
authenticode issuer 'CN=Jakub Jareš, O=Jakub Jareš, L=Praha, C=CZ' of the
previously-installed module 'Pester' with version '5.4.0' from root certificate
authority 'CN=DigiCert Assured ID Root CA, OU=www.digicert.com, O=DigiCert Inc,
C=US'. If you still want to install or update, use -SkipPublisherCheck parameter.

Expected Behavior

Upgrade should work

Steps To Reproduce

Install-Module pester

Describe your environment

Pester version : 5.4.0 C:\Users<user>\Documents\PowerShell\Modules\Pester\5.4.0\Pester.psm1
PowerShell version : 7.4.6
OS version : Microsoft Windows NT 10.0.22631.0

Possible Solution?

None at the moment

@nohwnd
Copy link
Member

nohwnd commented Feb 6, 2025

Hello, this is a known issue, documented here: https://github.com/pester/Pester?tab=readme-ov-file#signing-certificates

Pester is signed, and over the years the issuing authority certificate had to change to remain safe. Powershell cannot accommodate that and assumes the code author changed, which could lead to substitution attacks so it warns you.

You are updating from 5.4.0 to 5.7.0, certificate changed in 5.6.0.

Using -SkipPublisherCheck is needed to complete the update. Or uninstalling and installing.

@nohwnd nohwnd closed this as completed Feb 6, 2025
@ElvenSpellmaker
Copy link
Author

Thanks for the clarification!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants