The specified item could not be found in the keychain (-25300) macOS Origin: Platform & cloud OSI layer 7 · Application Last updated 5 Nov 2026

macOS: security: SecKeychainSearchCopyNext: The specified item could not be found in the keychain. (errSecItemNotFound -25300)

A lookup in the macOS keychain found no matching item, or access to it was denied.

Exact message you may see The specified item could not be found in the keychainsecurity: SecKeychainSearchCopyNext: The specified item could not be found in the keychainerrSecItemNotFound -25300OSStatus -25300User interaction is not allowed. errSecInteractionNotAllowed -25308
Seen on: macOS

Meaning

Check the service/account names used in security find-generic-password -s SERVICE -a ACCOUNT, make sure you search the right keychain (login vs System), and that the item wasn't removed. For CI keychains, unlock with security unlock-keychain first and set a search list.

Common causes

  • Item never saved or removed
  • Wrong service/account/label
  • Wrong keychain (login/System/custom)
  • Keychain locked (CI)
  • Access control blocks the calling app

⚡ Quick fix

  1. security find-generic-password -s "service" -a "account" -w
  2. security unlock-keychain -p PASS ~/Library/Keychains/login.keychain-db
  3. Add the item again with security add-generic-password

Detailed fix by platform

macOS

  1. security list-keychains and security find-generic-password -s NAME

How to diagnose

  1. Name — Service/account correct?
  2. Keychain — Which one?
  3. Lock — Unlocked?

🔧 Still not fixed?

Many errors look alike. If the steps above didn’t solve it, one of these is probably what you’re facing:

Where this error sits

Origin: Platform & cloud. Errors that are often confused with or caused by this one (click to open):

"x" can't be opened because it is from an unidentified developer — macOS: “app” can’t be opened because it is from an unidentified developer (macOS)"x" can't be opened b…ActiveModel::ForbiddenAttributesError (strong parameters) — Rails: ActiveModel::ForbiddenAttributesError (Ruby / Rails)ActiveModel::Forbidde…Apple could not verify "x" is free of malware — macOS: “app” cannot be opened because Apple cannot check it for malicious software / Apple could not verify “app” is free of malware that may harm your Mac (macOS)Apple could not verif…Bad configuration option: usekeychain — ssh: /Users/me/.ssh/config: line 5: Bad configuration option: usekeychain (macOS)Bad configuration opt…codesign: resource fork, Finder information, or similar detritus not allowed — macOS: Error: resource fork, Finder information, or similar detritus not allowed (macOS)codesign: resource fo…git: 'credential-osxkeychain' is not a git command — Git: git: 'credential-osxkeychain' is not a git command. See 'git --help' (macOS)git: 'credential-osxk…is damaged and can’t be opened — macOS: “App” is damaged and can’t be opened. You should move it to the Trash. (macOS)is damaged and can’t …NO_PUBKEY — The following signatures couldn't be verified because the public key is not available: NO_PUBKEY (Linux)NO_PUBKEYThe speci…

Explore the map of this error Full error map →

🧠 Still stuck? Analyze your error

Paste the full message, response headers or stack trace — we'll detect the platform and point to the most likely cause.

💬 What worked for others

No tips yet — did something else fix this for you?

Share what worked for you

Tips are checked by an editor before they appear. Links are removed.