YahnisElsts / plugin-update-checker

A custom update checker for WordPress plugins. Useful if you don't want to host your project in the official WP repository, but would still like it to support automatic updates. Despite the name, it also works with themes.
MIT License
2.22k stars 403 forks source link

Theme setup on gitlab receiving this error: cURL error 60: SSL certificate problem: unable to get local issuer certificate #519

Open collinblank opened 1 year ago

collinblank commented 1 year ago

Trying to connect this with gitlab. Receiving these errors when I debug. Not sure why http request failed or why requested url is different. It's including encoded slash after username (not sure if that's a problem but it's not in my functions.php.

No updates found. The update checker encountered 4 API errors.

1) cURL error 60: SSL certificate problem: unable to get local issuer certificate Error code: http_request_failed Requested URL: https://gitlab.domain.net/api/v4/projects/username%2Fgit-repo/releases?per_page=1 2) cURL error 60: SSL certificate problem: unable to get local issuer certificate Error code: http_request_failed Requested URL: https://gitlab.domain.net/api/v4/projects/username%2Fgit-repo/repository/tags 3) cURL error 60: SSL certificate problem: unable to get local issuer certificate Error code: http_request_failed Requested URL: https://gitlab.domain.net/api/v4/projects/username%2Fgit-repo/repository/branches/main 4) Could not retrieve version information from the repository. This usually means that the update checker either can't connect to the repository or it's configured incorrectly. Error code: puc-no-update-source

YahnisElsts commented 1 year ago

It's been a while since I've seen one of these, but I think this SSL error probably means that the certificate bundle on your server is out of date. The bundle file path is usually set by the curl.cainfo or the openssl.cafile option in php.ini. Unfortunately, I can't give you specific instructions for updating the certificate bundle - I'm not very familiar with the process, and it can vary depending on the OS.

collinblank commented 1 year ago

Do you know why when we provide the proper URL in the functions file, why the requested URL is different adding /api/v4/projects and adding the encoded "/" (%2F)?

YahnisElsts commented 1 year ago

That most likely has nothing to do with the SSL error, but if you're curious: