What worked for me was to unlock the keychain with:
security unlock-keychain login.keychain-db
Unfortunately, this requires typing the user password. But then the error -25308 is gone.
Topic:
Privacy & Security
SubTopic:
General
Tags: