0
1

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

shotgun [SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: unable to get local issuer certificate (_ssl.c:1108)>

Last updated at Posted at 2022-05-30

or users of Powershell on Windows 10 or Powershell 3 on Windows 7 (I don’t have access to a Windows 8 machine, it may work, or not, in which case you’ll want to keep reading until the end), you can run the following script as an administrator on the computer to get the new certificate.

$cert_url = "https://www.amazontrust.com/repository/AmazonRootCA1.cer"
$cert_file = New-TemporaryFile
Invoke-WebRequest -Uri $cert_url -UseBasicParsing -OutFile $cert_file.FullName
Import-Certificate -FilePath $cert_file.FullName -CertStoreLocation Cert:\LocalMachine\Root

If the command worked, you should see this:
PSParentPath: Microsoft.PowerShell.Security\Certificate::LocalMachine\Root

Thumbprint Subject


8DA7F965EC5EFC37910F1C6E59FDC1CC6A6EDE16 CN=Amazon Root CA 1, O=Amazon, C=US

This will make the certificate available for all user accounts on the computer it is run on. If you don’t have admin access, you can change the last line with
Import-Certificate -FilePath $cert_file.FullName -CertStoreLocation Cert:\CurrentUser\Root

and the certificate will be added for the current user only.

0
1
1

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
1

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?