1

I receive this error when run my job:

GuzzleHttp/Exception/RequestException with message 'cURL error 77: error setting certificate verify locations:*emphasized text*
  CAfile: /tmp/curl_haxx_se_ca_cacert_pem.pem
  CApath: /etc/ssl/certs (see https://curl.haxx.se/libcurl/c/libcurl-errors.html)'

Please, help-me

Jhon Dev
  • 13
  • 2
  • Have you read [this](https://stackoverflow.com/questions/30240840/laravel-5-socialite-curl-error-77-error-setting-certificate-verify-locations#:~:text=it%20means%20you%20are%20missing,fine%20error%2077%20has%20gone.), [this](https://laracasts.com/discuss/channels/laravel/curl-error-77-error-setting-certificate-verify-locations-cafile-cwamp64binphpphp719extrassslcacertpem-capath-none), or [this](https://thebitguru.com/blog/1458-curl-error-77-error-setting-certificate-verify-locations-cafile)? Perhaps your answer lies within. What have you tried to solve this so far? – FullStackOfPancakes Aug 06 '20 at 23:01

1 Answers1

0

I found this solution: https://github.com/guzzle/guzzle/issues/1935#issuecomment-629548739

Use 'verify => false'

$client = new Client([
      'base_uri'        => 'https://api.target'
      'verify'          => false, //https://github.com/guzzle/guzzle/issues/1935#issuecomment-629548739
      'headers'         => [
       //Your header here
  ]
]);

if you use the http (Illuminate\Support\Facades\Http) https://laravel.com/docs/7.x/http-client#guzzle-options


$response   = Http::withOptions([ //use this method
                'verify'     => false, //This key and value in this method
            ])->withHeaders([
                'Content-Type'  => 'application/json',
                'Accept'        => 'application/json',
            ])->get($url);
return $response;
DEV Tiago França
  • 1,271
  • 9
  • 9