LoginSignup
2
2

More than 5 years have passed since last update.

Windows上でhirak/prestissimoの並列DLがすべてfailureになる場合の対処

Posted at

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.inicurl.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

問題なく動きました。

2
2
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
2
2