Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to set default keychain via cli in mac?

I got this error after deleting the default keychain expecting that MacOS will pick the available one as default but it did not.

security: cert import failed: A default keychain could not be found. security: problem decoding

I want to set the default keychain using cli

like image 666
Ted Avatar asked Jan 25 '26 07:01

Ted


1 Answers

security default-keychain -s "/Users/ted/Library/Keychains/login.keychain-db"

Found it in

man security
like image 189
Ted Avatar answered Jan 28 '26 16:01

Ted