Skip to content

Instantly share code, notes, and snippets.

@ziadoz

ziadoz/homestead.sh

Last active Oct 14, 2020
Embed
What would you like to do?
Add and Remove Laravel Homestead Root CA to and from the macOS Keychain
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