docksal / addons

Community driven, submit your addon! Docksal addons that can be installed via `fin addon install` command.
MIT License
16 stars 34 forks source link

Issues with mkcert addon #62

Closed lmakarov closed 4 years ago

lmakarov commented 4 years ago

TL;DR: to get this addon to work (for now), run the following in your project repo:

brew install mkcert
mkcert -install
fin addon install mkcert -g
fin mkcert create
fin project restart

  1. The addons does not install mkcert binary if it's not available (at least on Mac):
$ fin addon install mkcert -g
Downloading addon main script
  mkcert/mkcert
Addon mkcert was installed globally 

$ fin mkcert create
Could not create ssl certificates. Is mkcert still installed?

Workaround - install mkcert manually:

$ brew install mkcert
==> Downloading https://homebrew.bintray.com/bottles/mkcert-1.4.1.catalina.bottle.tar.gz
Already downloaded: /Users/leonid/Library/Caches/Homebrew/downloads/bbb16f3e4bb2c54bb63c2aa3d1b6d4d297d460b16f336decd95e4135d6243390--mkcert-1.4.1.catalina.bottle.tar.gz
==> Pouring mkcert-1.4.1.catalina.bottle.tar.gz
🍺  /usr/local/Cellar/mkcert/1.4.1: 6 files, 5.3MB

$ fin mkcert create
Created ssl certificates for myproject.docksal

$ fin project restart
...
  1. The addon does not automatically run nor prompts to run mkcert --install to get the mkcert CA installed in the system. You have to manually run it, otherwise the host system won't trust the certs generated with mkcert:
$ mkcert -install
Using the local CA at "/Users/leonid/Library/Application Support/mkcert" ✨
Sudo password:
The local CA is now installed in the system trust store! ⚡️
The local CA is now installed in the Firefox trust store (requires browser restart)! 🦊

cc @fjmk