Skip to content

Instantly share code, notes, and snippets.

@jaceju
Created November 20, 2018 07:50
Show Gist options
  • Save jaceju/1f21cbce9190f529d20a61d78a00da3b to your computer and use it in GitHub Desktop.
Save jaceju/1f21cbce9190f529d20a61d78a00da3b to your computer and use it in GitHub Desktop.
Laravel Valet 的 curl 問題

問題

用 Valet secure 過的網站,用 curl 打的時候會遇到:

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

解決方法

兩個地方要設定:

編輯 ~/.zshrc ,加入

export CURL_CA_BUNDLE=${HOME}/.config/valet/CA/LaravelValetCASelfSigned.pem

編輯 /usr/local/etc/php/7.2/php.ini ,找到

;curl.cainfo=

改成:

curl.cainfo=/Users/<yourname>/.config/valet/CA/LaravelValetCASelfSigned.pem
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment