codemagic-ci-cd / cli-tools

Various utilities to managing Android and iOS app builds, code signing, and deployment.
https://codemagic.io/start/
GNU General Public License v3.0
245 stars 42 forks source link

Do not create keychains to temporary directory by default #126

Closed craastad closed 3 years ago

craastad commented 3 years ago

Naively using CLI tools can have undesirable consequences for the mac keychain. We should work to avoid these for default usages.

My mistake was fixed with keychain make-default ~/Library/Keychains/login.keychain-db

I think that maybe we shouldn’t generate the keychain into $TMPDIR directory by default. when default keychain is not restored back to the system default login keychain and a reboot is performed, then the previous default keychain goes missing and system OS finds itself in a odd situation where default keychain is set, but it doesn’t exist.

The code changes are drafted in: https://github.com/codemagic-ci-cd/cli-tools/pull/125/files

priitlatt commented 3 years ago

Currently keychain initialize indeed creates new keychain into a temporary directory by default. This can cause issues if system is rebooted and login keychain is not set to default beforehand.

priitlatt commented 3 years ago

Fix was released in version 0.9.0.