If your Mac keeps asking for your keychain password
Your keychain may be locked automatically if your computer has been inactive for a period of time or your user password and keychain password are out of sync. You can set a length of time that Keychain Access waits before automatically requiring you to enter your password again.
In the Keychain Access app on your Mac, click “login” in the Keychains list.
Choose Edit > Change Settings for Keychain “login.”
Select the “Lock after” checkbox, then enter a number of minutes.
If you want to require a password each time the computer goes to sleep, select the “Lock when sleeping” checkbox.