Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

cURL error 77: error setting certificate verify locations: CAfile #757

Closed
cavo789 opened this issue Oct 31, 2018 · 2 comments
Closed

cURL error 77: error setting certificate verify locations: CAfile #757

cavo789 opened this issue Oct 31, 2018 · 2 comments

Comments

@cavo789
Copy link

cavo789 commented Oct 31, 2018

Good morning all,

Using php-github-api first on my localhost, I was facing this error: Fatal error: Uncaught GuzzleHttp\Exception\RequestException: cURL error 77: error setting certificate verify locations: CAfile.

The solution is given in the Guzzle repository: guzzle/guzzle#1935 (comment)

Hope this can helps someone else.

And thank you KNP Labs for your great library!

@cavo789 cavo789 closed this as completed Oct 31, 2018
@Eze4Manuel
Copy link

Connections from your localhost arent not secured. Either you install openSSL in your localhost or you try working on your work remotely via a secured connection

@tiagofrancafernandes
Copy link

tiagofrancafernandes commented Aug 6, 2020

I found this solution: guzzle/guzzle#1935 (comment)

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;

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants