Skip to content

macOS credentials not found error apparently changed #177

@felixfontein

Description

@felixfontein

https://github.com/docker/docker-credential-helpers/blob/master/osxkeychain/osxkeychain_darwin.go contains the hardcoded string The specified item could not be found in the keychain. supposedly returned by SecCopyErrorMessageString (https://github.com/docker/docker-credential-helpers/blob/master/osxkeychain/osxkeychain_darwin.c#L7-L15) when an entry cannot be found in the keychain. Apparently that error message changed to No stored credential for XXX, according to the error messages reported in docker/docker-py#2482.

It would probably better to not rely on magic strings returned by SecCopyErrorMessageString, but instead (also) using the enum values (https://developer.apple.com/documentation/security/1542001-security_framework_result_codes?language=objc), probably this one: errSecItemNotFound.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions