Skip to content
Latchkey

xcodebuild "No account for team" in CI

Xcode knows which team to sign with but has no signed-in Apple account for that team, so it cannot fetch certificates or profiles.

What this error means

The build reports No account for team "ABCDE12345". The runner has no Apple account configured and no API key to act as one.

xcodebuild
error: No account for team "ABCDE12345". Add a new account in Accounts settings or verify that your accounts have valid credentials.

Common causes

No Apple account or API key on the runner

CI runners are not signed into Xcode, so any operation needing account access fails.

Automatic signing needs to talk to Apple

Automatic signing tries to reach App Store Connect for the team, which requires authentication CI does not have by default.

How to fix it

Provide an App Store Connect API key

  1. Create an API key in App Store Connect and store the .p8 and key id in CI secrets.
  2. Write the key to disk in a setup step.
  3. Pass the authentication key to xcodebuild.
shell
xcodebuild -scheme MyApp archive \
  -allowProvisioningUpdates \
  -authenticationKeyPath "${PWD}/AuthKey.p8" \
  -authenticationKeyID "${KEY_ID}" \
  -authenticationKeyIssuerID "${ISSUER_ID}"

Switch to manual signing with imported assets

Import the certificate and profile yourself and set manual signing so Xcode never needs to reach Apple during the build.

How to prevent it

  • Manage signing assets with an API key or fastlane match so no interactive Apple login is required. These steps require a macOS runner.

Related guides

Tired of flaky CI? Latchkey auto-heals failed jobs and retries them for you. Start free →