Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.

AskinSavascisi's avatar

cURL error 60: SSL: no alternative certificate subject name matches target host name 'oauth2.googleapis.com'

Hi,

I'm running a live app on forge/hetzner. it was working fine till today, my app runs every five minutes a command which syncs google calendar events to my app. Since morning i'm getting the following error:

cURL error 60: SSL: no alternative certificate subject name matches target host name 'oauth2.googleapis.com'

i've searched on google and tried following:

  1. downloaded cacert.pem file
  2. placed it in "/etc/nginx/ssl/app.mysite.be/1754848"
  3. edited php.ini file

[curl] ; A default value for the CURLOPT_CAINFO option. This is required to be an ; absolute path. curl.cainfo = "/etc/nginx/ssl/app.mysite.be/1754848/cacert.pem"

  1. restarted server
  2. ive printed phpinfo() and made sure CURLOPT_CAINFO was loaded

since it's a live app i don't want to disable any checks/verifying..

kind regards,

Askin

0 likes
5 replies
shamtoro's avatar

I've started getting this on Hetzner today too. It's affected all outgoing HTTP requests that use Guzzle in the background. Exploring this now.

1 like
shamtoro's avatar
shamtoro
Best Answer
Level 5

You should be able to fix this by installing running the following command:

sudo apt update
sudo apt install libcurl4-openssl-dev
1 like

Please or to participate in this conversation.