Skip to content

Instantly share code, notes, and snippets.

@mlcollard
Created December 27, 2021 15:54
Show Gist options
  • Save mlcollard/6a23a849b4fb45e3264c86c344de607e to your computer and use it in GitHub Desktop.
Save mlcollard/6a23a849b4fb45e3264c86c344de607e to your computer and use it in GitHub Desktop.
# Install on macOS
brew install mkcert
# Generate and install a local CA (Certification Authority)
# - Do this once
# - Can do so in any directory
mkcert -install
# Create a new certificate in your GitHub Pages repo top directory
# - Change to your directory
cd ~/mlcollard.github.io
# Create the certificate and key
mkcert localhost
# Run your local GitHub Pages with this certificate and key
bundle exec jekyll serve --ssl-cert ./localhost.pem --ssl-key ./localhost-key.pem
# Check your server
open https://localhost:4000
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment