-
Notifications
You must be signed in to change notification settings - Fork 82
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
A keychain with the same name already exists. On second run #8
Comments
This seems like a problem... I would expect the keychain to be cleared after the action finishes. |
@SoylentGraham are you using a self-hosted agent? Or are you executing the action multiple times in a workflow? There should be no retained state on GitHub hosted agents. |
@b-zurg The keychain needs to be retained for the entire job not just the action. As Xcode needs to access the keychain. |
Yeah, self hosted
On Thu, 6 Aug 2020 at 8:20 am, Oliver Jones ***@***.***> wrote:
@SoylentGraham <https://github.com/SoylentGraham> are you using a
self-hosted agent? Or are you executing the action multiple times in a
workflow?
There should be no retained state on GitHub hosted agents.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#8 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAQVIBK27ARD7GHYWIH4KEDR7JKS5ANCNFSM4OQEK2UA>
.
--
- Graham Reeves
- http://www.grahamreeves.com/
|
@SoylentGraham did you find any workaround ? |
I have the same problem on github action. Anyone found a solution? |
This fork will do a proper post-cleanup: https://github.com/figleafteam/import-codesign-certs |
For self-hosted hosts, you can manually clean the keychain after using it. Here's an example snippet: jobs:
build:
env:
# Unique keychain name so concurrent jobs don't get confused
KEYCHAIN: job-${{ github.job }}-${{ github.run_id }}-${{ github.run_number }}-${{ github.run_attempt }}
steps:
- uses: apple-actions/import-codesign-certs@v1
with:
keychain: ${{ env.KEYCHAIN }}
p12-file-base64: ${{ secrets.CERTIFICATE_P12_B64 }}
p12-password: ${{ secrets.CERTIFICATE_PASSPHRASE }}
- name: Delete keychain
if: always() # Always run this step to ensure the keychain is properly disposed of
run: |
security delete-keychain "${{ env.KEYCHAIN }}".keychain |
…ple-Actions#8) * add workflow * add workflow and remove husky * prettier tests
This PR should fix the issue described here: Apple-Actions/import-codesign-certs#8 - specifically when it is run multiple times in the same job. --------- Co-authored-by: Florian Loitsch <[email protected]>
I finally got this working (turns out my organisation secret doesn't propogate to my private repository)
On the second run, I get this error
security: SecKeychainCreate signing_temp.keychain: A keychain with the same name already exists.
At first, I had this on another repository so I called it
signing_temp2.keychain
, but that also errors the second time.Am I doing something wrong? Should it error just because it already exists? (same cert/credentials etc)
The text was updated successfully, but these errors were encountered: