Created
May 1, 2020 06:56
-
-
Save jayphelps/42f4f00b695b778a4f4ef629a391804c to your computer and use it in GitHub Desktop.
Add .crt SSL certificate to macOS Keychain via command line
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
SCRIPT="security add-trusted-cert -d -r trustAsRoot -p ssl -p basic -k /Library/Keychains/System.keychain "filename.crt"" | |
osascript -e "do shell script \"$SCRIPT\" with administrator privileges" | |
# or you can just run the above SCRIPT command with sudo directly. | |
# This osascript stuff is so that you get a native OS password prompt |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment