Windows上でhirak/prestissimoの並列DLがすべてfailureになる場合の対処
composerを利用している方は、大抵hirak/prestissimo
の存在を知っているでしょう。
composerでのダウンロードを並列化して速度が改善されるライブラリです。
windowsでこれを利用する場合、このような場合に直面することがあります。
λ composer update
Loading composer repositories with package information
Updating dependencies (including require-dev)
Finished: success: 0, skipped: 0, failure: 26, total: 26
このようにすべてfailure表示になってしまい、並列DLされないことです。
原因と対処
原因はcaの証明書が設定されてないからです。windowsでcurlとか扱ってると結構ぶち当たる問題です。
前提としてgit for windows
が入ってることとします。
php.ini
のcurl.cainfo
の値を修正します。
;curl.cainfo=
curl.cainfo="c:\Program Files\Git\usr\ssl\certs\ca-bundle.crt"
これでOK。
λ composer update
1/2: https://packagist.jp/p/provider-latest$d5028214f567cb1b18ce78d73e9a00a6ad5b2aa02c9375aee83251e4fc4ebac1.json
2/2: https://packagist.jp/p/provider-2018-10$9e1ffc28f4cf611b99bfff1dd5d38a0728a999a8de96b1c0a65807065442deac.json
Finished: success: 2, skipped: 0, failure: 0, total: 2
問題なく動きました。
Author And Source
この問題について(Windows上でhirak/prestissimoの並列DLがすべてfailureになる場合の対処), 我々は、より多くの情報をここで見つけました https://qiita.com/fagai/items/a87ab7cdf68b1dfffec0著者帰属:元の著者の情報は、元のURLに含まれています。著作権は原作者に属する。
Content is automatically searched and collected through network algorithms . If there is a violation . Please contact us . We will adjust (correct author information ,or delete content ) as soon as possible .