mirror of
https://github.com/FiloSottile/mkcert.git
synced 2026-04-25 21:45:59 +03:00
[GH-ISSUE #123] Change the location of the CA files #71
Labels
No labels
TLS stack issue
Windows
bug
duplicate
duplicate
enhancement
help wanted
help wanted
pull-request
question
question
root store
waiting for info
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/mkcert#71
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @electricarts on GitHub (Jan 21, 2019).
Original GitHub issue: https://github.com/FiloSottile/mkcert/issues/123
Sorry for the perhaps stupid question, but how can I change the location for the generated certificates? How do I use the variable $CAROOT when generating? An example would be great. For example, what should I do if I want to store the certificates in a folder under ~/local_certificates?
@adamdecaf commented on GitHub (Jan 21, 2019):
You can set CAROOT when calling mkcert:
You can also copy the existing CA and files:
cp $(mkcert -CAROOT)/* ~/local_certificates/@electricarts commented on GitHub (Jan 21, 2019):
Thanks for the help!
But what about the generated page certificates? Is there a possibility that they will automatically end up in the local_certificates folder?
@adamdecaf commented on GitHub (Jan 21, 2019):
You can have
mkcertwrite those anywhere, but by default those files are written in the directorymkcertis executed from.@electricarts commented on GitHub (Jan 21, 2019):
I think I'm too stupid for the terminal. 😉
The local CA is now in ~/local_certificates. But when I now create new certificates for my local URLs, the CA under ~/Library/Application Support/mkcert is still used. Do I have to delete the local CA generated with the "normal" installation (in ~/Library/Application Support/mkcert) first?
@adamdecaf commented on GitHub (Jan 21, 2019):
You can set
CAROOTin your shell profile (~/.bashrcas an example) to always override the default.@electricarts commented on GitHub (Jan 21, 2019):
Unfortunately this does not change anything. After the entry in the shell profile, a new CA certificate is created in
~/local_certificatesafter callingmkcert(as before with$ CAROOT=~/local_certificates mkcert -install). But the URL certificates are stored again in~and not in~/local_certificates.@adamdecaf commented on GitHub (Jan 21, 2019):
Oh, by default
mkcertwrites those to the directory it's ran from. You can set two flags to override that (or copy the files).@electricarts commented on GitHub (Jan 21, 2019):
Ok. And I have to set this flag 4 times if the generated certificate should be valid for
example.test, *.example.test, localhost and 127.0.0.1? This is too much stress for me. Then the certificates remain without a folder in~. Not very organized but I have to live with that.Nevertheless thanks a lot for your support! I am unfortunately only a pixel pusher.
@adamdecaf commented on GitHub (Jan 21, 2019):
That worked for me.
@electricarts commented on GitHub (Jan 21, 2019):
Yesss! That worked! Many many thanks for your help!
I made a snippet in TextExpander with a placeholder for my local URLs. So I only have to type in the abbreviation in the terminal, enter the desired local URL in the placeholder and press Enter. And everything is in the desired place. 🙂
@adamdecaf commented on GitHub (Jan 21, 2019):
Sweet! Feel free to close out this issue if we solved your problems. 😁