Skip to content
This repository has been archived by the owner on Oct 8, 2024. It is now read-only.

Unable to locate a valid CA certificate file #115

Open
MartinRaitza opened this issue Aug 18, 2020 · 5 comments
Open

Unable to locate a valid CA certificate file #115

MartinRaitza opened this issue Aug 18, 2020 · 5 comments

Comments

@MartinRaitza
Copy link

MartinRaitza commented Aug 18, 2020

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.

@shyim
Copy link
Member

shyim commented Sep 11, 2020

Hey,

I cannot reproduce it. Still issue?

@MartinRaitza
Copy link
Author

Hey @shyim,
thank your for your answer.

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

@chriskrj
Copy link

Ich have the Same Error
Mac OS 10.15.7
Docker Desktop 2.5.0.1

@askolt
Copy link

askolt commented Mar 25, 2021

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

@MartinRaitza
Copy link
Author

@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!

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

No branches or pull requests

4 participants