Home  >  Article  >  Backend Development  >  How to Fix \"x509 certificate signed by unknown authority\" Error When Querying Pingdom with Pingdom-Go?

How to Fix \"x509 certificate signed by unknown authority\" Error When Querying Pingdom with Pingdom-Go?

Mary-Kate Olsen
Mary-Kate OlsenOriginal
2024-10-24 05:08:02199browse

How to Fix

Unable to Query Pingdom: "x509 certificate signed by unknown authority"

When attempting to query Pingdom via the Go package pingdom-go, errors may arise if the Alpine container lacks the necessary certificates. This issue manifests through the error message: "Get https://api.pingdom.com/api/2.1/checks/0: x509: certificate signed by unknown authority".

To resolve this problem, several approaches can be considered:

  1. Install Certificates:

    As suggested by @TimCooper, installing certificates on the Alpine container can resolve the issue. This can be achieved by running the following command:

    apk add --no-cache ca-certificates
  2. Utilize GoogleContainerTools/distroless:

    Alternatively, consider using the GoogleContainerTools/distroless image. While also minimal, it includes essential components such as certificates, making development more seamless.

The above is the detailed content of How to Fix \"x509 certificate signed by unknown authority\" Error When Querying Pingdom with Pingdom-Go?. For more information, please follow other related articles on the PHP Chinese website!

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn