ios-build keychain not deleted
Closed this issue · 6 comments
Hi,
i runned the action on a self-hosted machine. At the end it fails because of a provisioning profile problem with the private key.
I probably pass the wrong private key in the secret.
After the fails in my local Keychain Access, the ios-build
keychain is persisted, and i can't remove it since the pass is randomly generated.
after that all my next builds on that machine fails:
[19:04:57]: Found keychain '~/Library/Keychains/ios-build.keychain', creation skipped
[19:04:57]: If creating a new Keychain DB is required please set the `require_create` option true to cause the action to fail
+---------------------------+---------------------------------------------------------+
| Lane Context |
+---------------------------+---------------------------------------------------------+
| DEFAULT_PLATFORM | ios |
| PLATFORM_NAME | ios |
| LANE_NAME | ios export_ipa |
| KEYCHAIN_PATH | ~/Library/Keychains/ios-build.keychain |
| ORIGINAL_DEFAULT_KEYCHAIN | "/Users/giulio/Library/Keychains/ios-build.keychain-db" |
+---------------------------+---------------------------------------------------------+
[19:04:57]: Shell command exited with exit status 51 instead of 0.
+------+------------------+-------------+
| fastlane summary |
+------+------------------+-------------+
| Step | Action | Time (in s) |
+------+------------------+-------------+
| 1 | default_platform | 0 |
| 💥 | create_keychain | 0 |
+------+------------------+-------------+
i think the delete_keychain(name: 'ios-build.keychain')
method should be called even if the build fails.
Any ideas how to remove the ios-build.keychain?
Hey @CinGiu I was able to delete the keychain by deleting the keychain file instead, then creating a new keychain with the same name, then deleting the new keychain in Access.
yes, somehow i managed to remove it by wiping out the entire keychain. ios-build.keychain
was locked and the password was randomly generated.
i think it is a matter of time, if it fails and no activity in a while, it locks forever..
hi @CinGiu how can i delete the keychain on github actions ? im using self hosted server and getting exact same issue
I also think the keychain should be deleted even if the build fails. I don't want to wipe the entire keychain just to get rid of it.
Also, it would be good if we could give it a set password value ourselves as an input or an environment variable, instead of it getting set to a randomized one. That way, we could manipulate the keychain ourselves if needed.
I found a way to delete the keychain instead of wiping everything:
security delete-keychain ios-build.keychain