Laravel 6.20.27 (PHP v7.4.19) 的 Sentry v2.10 的 SSL 错误

SSL Error for Sentry v2.10 with Laravel 6.20.27 (PHP v7.4.19)

我在 Laravel v6.20.27 和 PHP v7.4.19 中使用 sentry(版本 2.10)。我遵循文档中提到的相同步骤 (https://docs.sentry.io/platforms/php/guides/laravel/other-versions/laravel5-6/)。但是我无法继续,因为我收到以下错误

There was an error sending the event.
SDK: Failed to send the event to Sentry. Reason: "SSL peer certificate or SSH remote key was not OK for "https://oXXXXXXX.ingest.sentry.io/api/XXXXXXXX/store/".".
Please check the error message from the SDK above for further hints about what went wrong.

请帮我解决这个问题。

生成SSL证书时,必须指定主机名或服务器名。如果它与您的真实主机或服务器名称不匹配,您会看到此错误。 检查这个 repo https://gitlab.com/damp-stack/mysql-ssl-docker/-/blob/master/gencerts.sh fake-server 应该等于你的服务器名称。

我在本地遇到了同样的问题。我在 Windows.

上使用 Laragon

我使用此 link

下载了一个新的 cacert.pem 文件

只需将其替换为您当前在 ssl 文件夹中的那个即可。希望这会解决您的问题。