Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

composer:Curl ssl error :unable to get local issuer certificate #930

Closed
prajput1merkle opened this issue May 19, 2023 · 2 comments
Closed

Comments

@prajput1merkle
Copy link

Hello I am trying to run the composer install in my local system and every time it fails and throws :
Failed to download module_name, trying the next URL (0: curl error 60 while downloading https://repo.packagist.com/#####.zip: SSL certificate problem: unable to get local issuer certificate)

Steps To Reproduce

  1. curl -s https://raw.githubusercontent.com/markshust/docker-magento/master/lib/template | bash
  2. git clone git@bitbucket.org:repo src
    3.bin/start --no-dev
    4.bin/setup-composer-auth
    5.bin/cli git checkout integration
    6.bin/copytocontainer --all
    7.bin/composer install

composer should work

throwing error

OS: Apple M1 Max
Zscalar: yes
Magento : 2.4.5.p2
docker : https://github.com/markshust/docker-magento

Somehow its a Zscalar issue but I am not sure if yes how can I solve this?
here are some screenshots with my finding

https://serverfault.com/questions/1100480/wsl-docker-curl-60-unable-to-get-local-issuer-certificate

Screenshot 2023-05-19 at 7 19 32 PM Screenshot 2023-05-19 at 10 47 50 PM Screenshot 2023-05-19 at 10 27 47 PM
@prajput1merkle
Copy link
Author

Hello
after hundred of debugging Finally found the solution from Mark shust itself :

For macOS:
Export Zscalar certificate from the keychain store

Convert the above exported file cer file to pem:

openssl x509 -inform der -in Zscaler-Root-CA.cer -out Zscaler-Root-CA.pem

copy this pem file to src folder

cp ~/Documents/Zscaler-Root-CA.pem ~/Sites/magento/src

copy this pem file to docker /var/www/html/ folder

bin/copytocontainer Zscaler-Root-CA.pem

copy file to docker’s ssl folder

bin/root cp /var/www/html/Zscaler-Root-CA.pem /usr/local/share/ca-certificates/Zscaler-Root-CA.pem

bin/restart

bin/root update-ca-certificates --fresh

Thank YOU MARK.

@MaheshBharadwaj
Copy link

MaheshBharadwaj commented Jul 4, 2023

Can you expand more on this? After which step do we run this? I have thee same issue (using zscaler) but I am not able to get this workaround to work. bin/restart is failing for me and says images missing. If i run removeall and install, it removes the certificate that we copied into the SSL folder. Thanks!

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

No branches or pull requests

2 participants