After having some hard time installing some packages with composer, i decided to give back some simple solutions for all of you.
First of all suppose you operate in a shared hosting environment where you are not able to mess with the openssl CA root certificates and change the paths.
So you can simply download locally (e.g. /home/kmak) this https://curl.haxx.se/ca/cacert.pem
After you install locally composer.phar you can create your composer.json by requiring your package:
Then edit composer.json and add the following config section, so finally your composer.json will look like this:
Now you can proceed like this:
If you encouter further SSL certificate errors due to git attempting to clone some project, then you can do this:
Until some time ago i was suggesting in this post to turn off git SSL certificate verifycation by setting the following environment variable:
This is really bad practise and your should remember that disabling SSL certificate verification is a major security issue and should be avoided.