If you get an error like this using Docker desktop:

Error saving credentials: error storing credentials - err: exit status 1, out: error getting credentials - err: exit status 1, out: keychain cannot be accessed because the current session does not allow user interaction. The keychain may be locked; unlock it by running “security -v unlock-keychain ~/Library/Keychains/login.keychain-db” and try again

your .docker/config.json contains something like this:

{
  "auths": {
    ...
  }, 
  "credsStore": "desktop"
}

Make it look like:

{
  "auths": {
    ...
  }
}