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.
Sync your keychain password and user password
When you first set up your account on your Mac, your user password and keychain password are the same. Whenever you log in to your computer, Keychain Access automatically unlocks the login keychain.
Under some circumstances—if, for example, the user password is changed—it can get out of sync with the keychain password.
In the Keychain Access app on your Mac, click “login” in the Keychains list.
Choose Edit > Change Password for Keychain “login.”
If the keychain is locked, enter the previous user password, then click OK.
If you entered the correct password, a new window appears.
Enter the previous user password again in the Current Password field.
Enter the current user password in the New Password field.
Reenter the current user password in the Verify field, then click OK.
Set how often you’re required to enter your keychain password
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 and enter a number of minutes of inactivity.
If you want to require a password each time the computer goes to sleep, select the “Lock when sleeping” checkbox.
Click Save.