Install CA with mkcert on local DDEV site with non-sudo user

40 Views Asked by At

I am running a Mac with Ventura and a non-admin ("normal") user account. I have access to an admin user which is how I installed DDEV and mkcert with homebrew. However, I can not run mkcert -install to create a local CA with my normal user for my project without a sudo password, which I don't have and am not allowed to get. Any ideas?

normal-user$ mkcert -install
Created a new local CA 
Sudo password:

normal-user is not in the sudoers file.

2

There are 2 best solutions below

0
Daniel Watts On BEST ANSWER

Unfortunately in my particular case there seems to be no way to run mkcert -install on MacOS with a user that does not have sudo access. I was able to get my IT dept to temporary enabled admin privs for my normal user, which allowed me to run mkcert -install successfully.

I can confirm that after the initial install was run, even after the admin privs were revoked, I could spin-up additional DDEV projects with HTTPS with no problem.

3
rfay On

If you have adequate permissions you can probably install the CA directly into your browser instead of into the system store.

One set of answers is at https://www.techrepublic.com/article/how-to-add-a-trusted-certificate-authority-certificate-to-chrome-and-firefox/

Give that a try. It may also be limited by your permissions. You can find the mkcert CA location using the command mkcert -CAROOT