Skip to content

Instantly share code, notes, and snippets.

@capripot
Last active May 12, 2025 15:19
Show Gist options
  • Select an option

  • Save capripot/4b5e92011dc478edeacad268190a5384 to your computer and use it in GitHub Desktop.

Select an option

Save capripot/4b5e92011dc478edeacad268190a5384 to your computer and use it in GitHub Desktop.
puma-dev install certificate

In case anyone else is automating their Firefox + puma-dev setup, here's one way to install the puma-dev CA cert without using the GUI or other manual intervention:

# Tell Firefox about the puma-dev CA cert. Don't care whether Firefox is
# currently installed, since we still need this to work when/if it is.
#
# https://github.com/mozilla/policy-templates/blob/master/README.md#certificates--install
for firefox in firefox firefoxdeveloperedition; do
  plist="/Library/Preferences/org.mozilla.$firefox.plist"
  [[ -f "$plist" ]] || sudo plutil -create xml1 "$plist"
  sudo plutil -replace EnterprisePoliciesEnabled -bool TRUE "$plist"
  sudo plutil -replace Certificates -json "{ \"Install\": [ \"$HOME/Library/Application Support/io.puma.dev/cert.pem\" ] }" "$plist"
done

(Alternatively, you could enable Keychain support instead of installing the specific cert.)

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