Home » How To » 0x8a15005e: The server certificate did not match any of the expected values

0x8a15005e: The server certificate did not match any of the expected values

When there is a problem with certificate pinning, winget shows the “0x8a15005e: The server certificate did not match any of the expected values” error when trying to install or update apps. Certificate pinning is a newly introduced security enhancement in Winget that is designed to provide an additional layer of security by authenticating and confirming that you are connecting to the real msstore endpoint.

However, under certain circumstances like reinstalling Windows, changes to network settings, issues with Windows updates, corrupted files, etc., winget shows the server certificate did not match error and stops you from installing or updating apps.

winget 0x8a15005e: The server certificate did not match error
winget 0x8a15005e: The server certificate did not match error

Thankfully, the winget 0x8a15005e error is quite easy to fix. Follow the steps below.

Fix 0x8a15005e: The server certificate did not match any of the expected values

To fix the 0x8a15005e: The server certificate did not match error in winget you have to disable certificate pinning. It’s a relatively simple process. Here’s how to do it.

Step 1: Open Windows Terminal with administrator rights.

You can disable certificate pinning in winget using Windows Terminal. So, right-click on the Start menu icon on the taskbar and choose the Windows Terminal (Admin) option. To disable certificate pinning, you need admin rights.

open Windows terminal as admin

Step 2: Run the BypassCertificatePinning command on winget.

In the terminal window, paste the below command and press the Enter button. Once the command successfully executes, you will see the “Admin setting enabled” response. With that, the certificate pinning is disabled in winget.

winget settings –enable BypassCertificatePinningForMicrosoftStore

winget command to disable certificate pinning and fixing 0x8a15005e server certificate did not match error

Step 3: Close Windows Terminal and restart your computer.

After running the command, close the terminal window by clicking on the X icon on the title bar. Next, restart your computer to ensure all the changes are applied.

Windows 11 restart option

That is it. With that, the winget 0x8a15005e: The server certificate did not match error is fixed.

Conclusion

If you are wondering, this fix is not ideal. That is, you are disabling a security feature intended to protect you from tampering and MITM attacks. That being said, unless you are in a super vulnerable environment or know you are being targeted, it is not that much of a security risk.

Of course, it is best if you enable certificate pinning in winget. So, I recommend you enable it in the future as it might be fixed automatically with regular operations or Windows updates. To enable certificate pinning in winget, run the below command.

winget settings –disable BypassCertificatePinningForMicrosoftStore

If you face the server certificate did not match error, you can also disable certificate pinning just as easily.

That is all. It is that simple to fix the winget 0x8a15005e error.

I hope this simple and easy Windows how-to guide helped you.

If you are stuck or need help, send an email, and I will try to help as much as possible.

Related winget how-to articles:

Leave a Comment

Your email address will not be published. Required fields are marked *

Scroll to Top