Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

A keychain with the same name already exists. On second run

See original GitHub issue

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)

Issue Analytics

  • State:open
  • Created 3 years ago
  • Comments:8 (2 by maintainers)

github_iconTop GitHub Comments

alexkirszcommented, Jan 12, 2022

For self-hosted hosts, you can manually clean the keychain after using it. Here’s an example snippet:

      # Unique keychain name so concurrent jobs don't get confused
      KEYCHAIN: job-${{ github.job }}-${{ github.run_id	}}-${{ github.run_number }}-${{ github.run_attempt }}
      - uses: apple-actions/import-codesign-certs@v1
          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
b-zurgcommented, Jul 14, 2020

This seems like a problem… I would expect the keychain to be cleared after the action finishes.

Read more comments on GitHub >

github_iconTop Results From Across the Web

"keychain with the same name already exists ... - Jenkins Jira
I have a build set up using the Xcode plugin with a restriction set to run on an OSX build slave. The first...
Read more >
Error: [SecKeychainItemImport: The specified item already ...
I'm getting the below error. I've added the Bamboo log below. security: SecKeychainItemImport: The specified item already exists in the keychain ...
Read more >
Certificate Assistant - certificate alrea… - Apple Community
I seem to have backed myself into a corner with Certificate Assistant. I created a new keychain, and a self-signed CA.
Read more >
Github action macos keychain access - Stack Overflow
These issues (fastlane just hangs when gym runs) seem to arise when using match. Here's the log that makes me think it's keychain...
Read more >
Configuring Keychain Management - Cisco
Each key in a keychain has two lifetimes, as follows: ... (Optional) show key chain name ... Confirms that the keychain no longer...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Post

No results found

github_iconTop Related Hashnode Post

No results found