Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Getting SSL / https working locally for Rails with puma-dev

puma-dev should work with https / SSL with just the initial install puma-dev -install when you visit https://yourlocalsitename.dev.

I can see the certificate in Chrome > Dev Tools > Security but it says

This page is not secure (broken HTTPS).

Certificate Error
There are issues with the site's certificate chain (net::ERR_CERT_AUTHORITY_INVALID).

How can I get puma-dev working in https locally?

like image 469
Brian Sigafoos Avatar asked Dec 11 '22 13:12

Brian Sigafoos


2 Answers

If the normal puma-dev -install doesn't work even after brew uninstall/install of puma-dev try this recommended here

  1. In Chrome > Developer Tools > Security click View Certificate
  2. Drag the icon for the certificate to your OS X desktop
  3. From your desktop, double click on the cert to install it in your OS X > Keychain Access as System (not login)
  4. From Keychain Access, double click on the cert (in System) and change the dropdown to Always Trust

Now try visiting https://yourlocalsitename.dev again, but in a new tab, and it should be green for https.

like image 63
Brian Sigafoos Avatar answered Jan 12 '23 00:01

Brian Sigafoos


this is the most recent method.

security add-trusted-cert -k login.keychain-db ~/Library/Application\ Support/io.puma.dev/cert.pem

https://github.com/puma/puma-dev/issues/84#issuecomment-269588573

like image 31
Swain Avatar answered Jan 12 '23 00:01

Swain