I am trying to switch on a certain keychain, and close another one. I need this because our enterprise & appstore identities are called the same.
Right now, I do a "security unlock-keychain" followed by a "security default-keychain" to open the correct keychain and do a "security lock-keychain" on the keychain I wish not to use.
But xcodebuild still sees the entries in both keychains and gives up.
iPhone Distribution: Company name.: ambiguous (matches "iPhone Distribution: Company name." in /Users/user/Library/Keychains/login.keychain and "iPhone Distribution: Company name" in /Users/user/Library/Keychains/enterprise.keychain)
How do I prevent the system from finding the entry in the keychain that I lock?