How to set default keychain via cli in mac?
Asked Answered
S

1

11

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

Shillong answered 25/2, 2021 at 11:3 Comment(0)
S
17
security default-keychain -s "/Users/ted/Library/Keychains/login.keychain-db"

Found it in

man security
Shillong answered 25/2, 2021 at 11:3 Comment(2)
is it per session or it would be a permanent change ?Nosography
permanent. Use fastlane to create temporary keychainsShillong

© 2022 - 2024 — McMap. All rights reserved.