phplaravelgithubcurlcomposer-php

SSL Certificate Error While Downloading Packages from GitHub with cURL Body


I'm encountering an SSL certificate error while trying to download Laravel packages using Composer. Here’s the error message I receive:

SSL: no alternative certificate subject name matches target host name 'codeload.github.com'
Failed to download laravel/breeze from dist: curl error 60 while downloading https://codeload.github.com/laravel/breeze/legacy.zip

Steps Taken :

How can I fix this problem :

Any guidance or advice would be greatly appreciated!


Solution

  • It will be possible to fix it in two different ways.

    1. By Composer: Run the command in the terminal composer config -g secure-http false
    2. Or Manually update cacert.pem from composer directory

    After running 1st point you need to install the library and after that, you need to run again composer config -g secure-http true