Open terminal and run
php -r "var_dump(openssl_get_cert_locations());"
Note the location of
default_cert_file. It might say
Verify that that file exists. If not, download the cacert.pem file from https://curl.haxx.se/ca/cacert.pem and place it in somewhere preferably in
You now have a file is
Open your php.ini and add the location of the file
composer config --global cafile "/usr/local/ssl/cacert.pem"