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

Unable to get SSL Certificate #504

Closed
draper87 opened this issue Aug 4, 2021 · 5 comments
Closed

Unable to get SSL Certificate #504

draper87 opened this issue Aug 4, 2021 · 5 comments

Comments

@draper87
Copy link

draper87 commented Aug 4, 2021

Description
During setup with
curl -s https://raw.githubusercontent.com/markshust/docker-magento/master/lib/onelinesetup | bash -s -- magento.test 2.4.2
I got this notification:

Generating SSL certificate...
cat: can't open '/root/.local/share/mkcert/rootCA.pem': No such file or directory
Created a new local CA at "/root/.local/share/mkcert" 💥
The local CA is now installed in the system trust store! ⚡️

System password requested to install certificate authority on host...
Updating certificates in /etc/ssl/certs...
0 added, 0 removed; done.
Running hooks in /etc/ca-certificates/update.d...
done.
Using the local CA at "/root/.local/share/mkcert" ✨

Created a new certificate valid for the following names 📜

  • "magento.test"

The certificate is at "nginx.crt" and the key at "nginx.key" ✅

After checking with Chrome on Ubuntu 18.04 the SSL certificate looks invalid as shown here below
Screenshot from 2021-08-04 17-42-04

Screenshot from 2021-08-04 17-43-08

What should I do in order to solve this issue?
Steps To Reproduce

  1. curl -s https://raw.githubusercontent.com/markshust/docker-magento/master/lib/onelinesetup | bash -s -- magento.test 2.4.2

Expected Result
A valid certificate

Actual Result
Invalid certificate

@nverhoye
Copy link

nverhoye commented Aug 4, 2021

Hello,

Same issue here.

@markshust
Copy link
Owner

This appears to be a duplicate of #222

@Axel29
Copy link

Axel29 commented May 26, 2022

Hi,

I've just set up an existing project with your docker for the first time and I also get an NET::ERR_CERT_AUTHORITY_INVALID error.

I tried running the following commands: bin/setup-ssl thesages.test and bin/setup-ssl-ca thesages.test, which didn't thrown any error, but still the SSL is invalid.

I'm using Ubuntu 21.10 and the latest version of your Docker environment.

EDIT: I used the setup-ssl-ca script from #222 (comment) and it worked! Do you know @markshust if it is safe to use this version of the script?

EDIT 2: Re running the script broke the SSL ^^" Now I get the following output:

The local CA is already installed in the system trust store! 👍

                                                               System password requested to install certificate authority on host...
Checking for libnss3-tools: install ok installed
Notice: Trust flag u is set automatically if the private key is present.
certutil: could not add certificate to token or database: SEC_ERROR_ADDING_CERT: Error adding certificate to database.

Thanks for your help.


image

@markshust
Copy link
Owner

That's odd, because the contents of that comment should be the exact same file as the root bin/setup-ssl-ca script at https://github.com/markshust/docker-magento/blob/master/compose/bin/setup-ssl-ca as I merged in the related PR.

I'm honestly not sure was I don't currently have an Ubuntu machine set up to test this all out.

@AngeloZou
Copy link

I'm using ubuntu 22.04, and I had the same problem.
#959

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

No branches or pull requests

5 participants