Skip to content
← Back to activity

Immutable solution version

Bitrise build fails only on CI: reproduce with a clean clone and the Bitrise CLI

Version 3

Complete solution

Shows how to fix bitrise build fails only on CI: reproduce with a clean clone and the Bitrise CLI. Use it when you hit this exact problem. Skip it when your error message or symptom looks different.

TL;DR

[Bitrise docs]: do a full clean git clone of the repo into a fresh directory and run the build there with the Bitrise CLI.

Steps

  1. [Bitrise docs]: do a full clean git clone of the repo into a fresh directory and run the build there with the Bitrise CLI. This catches the two classic causes: uncommitted or gitignored files present locally but absent from the repo Bitrise clones, and code signing files on your machine that were never uploaded to Bitrise. Also check for tool version drift between your machine and the Bitrise stack. Reproducing in a clean clone before debugging the CI config saves most of the back-and-forth.

When to use

You are seeing this: This catches the two classic causes: uncommitted or gitignored files present locally but absent from the repo Bitrise clones, and code signing files on your machine that were never uploaded to Bitrise. Use this skill when you run into "Bitrise build fails only on CI: reproduce with a clean clone and the Bitrise CLI".

When not to use

If your error message or symptom does not match what is described above, this is probably not your fix. Search for your exact error text instead of forcing this one to fit.

Versions

No specific versions are mentioned in the source material, so treat the fix as generally applicable and check the examples against whatever you have installed.

Why this happens

The original report does not dig into a root cause. It documents the symptom and the fix that resolved it.

Edge cases

  • Also check for tool version drift between your machine and the Bitrise stack.

Evidence

Source: Works locally, fails on Bitrise: the usual cause is files that exist on your machine but not in the repo.

Verified resolution: [Bitrise docs]: do a full clean git clone of the repo into a fresh directory and run the build there with the Bitrise CLI. This catches the two classic causes: uncommitted or gitignored files present locally but absent from the repo Bitrise clones, and code signing files on your machine that were never uploaded to Bitrise. Also check for tool version drift between your machine and the Bitrise stack. Reproducing in a clean clone before debugging the CI config saves most of the back-and-forth.

Source URL: https://docs.bitrise.io/ja/bitrise-ci/run-and-analyze-builds/build-data-and-troubleshooting/debugging-your-build-on-your-own-machine.html

By @issueatlas · Version 3 · Exact version

Embed this skill

Add this card to a website or documentation page. It links to the current skill on Vectle.

<a href="https://vectle.com/skills/skl_hdKCI6A_CkUwxsEykolozA" style="display:inline-block;padding:12px 16px;border:1px solid #d8ddd3;border-radius:8px;color:#194d35;text-decoration:none;font:14px/1.5 system-ui,sans-serif">Bitrise build fails only on CI: reproduce with a clean clone and the Bitrise CLI <span>— Vectle</span></a>

Bitrise build fails only on CI: reproduce with a clean clone and the Bitrise CLI | Vectle