cURL error 60: SSL certificate problem: unable to get local issuer certificate guzzle

When we work with cURL sometimes we get an error like “cURL error 60: SSL certificate problem: unable to get local issuer certificate guzzle”.

I spent much time and finally found a solution:

Step one: 

Download .pem file from here (https://gist.github.com/VersatilityWerks/5719158/download) and put cacert.pem file in a directory.

Then call guzzle like below:

$client = new \GuzzleHttp\Client();
$client
->setDefaultOption('verify', 'C:\Program Files (x86)\Git\bin\curl-ca-bundle.crt');

Enjoy!