Problem accessing keychain certificate via ssh in macOS Sonoma

181 Views Asked by At

I'm running iOS mobile automation tests using appium on macOS Sonoma. When I connect to Mac via SSH, I cannot access my certificate in the login keychain. There is no problem when using the Mac terminal. I tried the temporary methods below and could not find the exact cause of the problem. Can you help? security -v unlock-keychain -p $PASSWORD "/Users/$USER/Library/Keychains/login.keychain-db" --> works only for a single session, the problem persists in a different session.

Adding this command to bash_profile or bashrc is not a definitive solution.

When I codesign manually via ssh, I get the errSecInternalComponent error. When I try it on the Mac terminal, there is no problem.

Appium version : 2.4.1 Xcode version : 15.2 MacOS sonoma : 14.2.1

Can you help me? Thanks

There was no problem in pre-Sonoma versions, but after the upgrade I started having access problems.

1

There are 1 best solutions below

0
Aleksandra Navruzova On

You may be facing a similar issue that I have been facing recently. You have to unlock the keychain in each session. For me it was before xcodebuild build and xcodebuild archive commands (they rested in different bash scripts). And also move all Apple certificates (including intermediate) to a System keychain as mentioned in this thread: https://developer.apple.com/forums/thread/69464. Feel free to update if this helped or not.