development icon indicating copy to clipboard operation
development copied to clipboard

Unable to locate a valid CA certificate file

Open MartinRaitza opened this issue 5 years ago • 5 comments

Script crashes on step 2/38 when running ./psh.phar install on docker (version 2.3.0.3) env. I tried the step by step installation on my mashine (MacOS Mojave 10.14.3).

(2/38) Starting

composer install --no-interaction --optimize-autoloader --no-suggest --no-scripts Unable to locate a valid CA certificate file. You must set a valid 'cafile' option. A valid CA certificate file is required for SSL/TLS protection. You can disable this error, at your own risk, by setting the 'disable-tls' option to true.

      [Composer\Downloader\TransportException]                   
      The configured cafile was not valid or could not be read.  

I tried to fix it but it doesnt work: php -r 'var_dump(openssl_get_cert_locations());' array(8) { ["default_cert_file"]=> string(21) "/usr/lib/ssl/cert.pem" Then in init-composer.sh: composer config --global cafile '/usr/local/etc/openssl/cert.pem'

or

docker run --privileged to modify the development php ini. Does not work either.

MartinRaitza avatar Aug 18 '20 07:08 MartinRaitza

Hey,

I cannot reproduce it. Still issue?

shyim avatar Sep 11 '20 07:09 shyim

Hey @shyim, thank your for your answer.

I will try it with the new code base on the weekend.

MartinRaitza avatar Sep 11 '20 08:09 MartinRaitza

Ich have the Same Error Mac OS 10.15.7 Docker Desktop 2.5.0.1

chriskrj avatar Nov 13 '20 13:11 chriskrj

Have the same error. Windows 10. Last composer.phar

askolt avatar Mar 25 '21 13:03 askolt

@askolt It works for me now.

With MacOS the default resources for docker are very low and not enough for the installation.

Try to push them up (under Preferences/Resources) and rerun.

My settings: CPUs: 4 Memory: 8.00 GB Swap: 3 GB

image

Worth a try!

MartinRaitza avatar Mar 25 '21 15:03 MartinRaitza