Last active
October 14, 2020 10:50
-
-
Save ziadoz/bf09b903ad4e2c99b590c71ef195b93b to your computer and use it in GitHub Desktop.
Add and Remove Laravel Homestead Root CA to and from the macOS Keychain
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| sudo security delete-certificate -c "Homestead homestead Root CA" /Library/Keychains/System.keychain 2> /dev/null | |
| sudo security add-trusted-cert -d -r trustRoot -p ssl -k /Library/Keychains/System.keychain ~/Projects/homestead/ca.homestead.homestead.crt 2> /dev/null | |
| function homestead() { | |
| ( cd ~/Projects/homestead && vagrant $* ) | |
| if [[ "$1" == "destroy" ]]; then | |
| sudo security delete-certificate -c "Homestead homestead Root CA" /Library/Keychains/System.keychain 2> /dev/null | |
| fi | |
| if [[ "$1" == "up" ]]; then | |
| sudo security add-trusted-cert -d -r trustRoot -p ssl -k /Library/Keychains/System.keychain ~/Projects/homestead/ca.homestead.homestead.crt 2> /dev/null | |
| fi | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment