can1357/oh-my-pi · error
Codex Security cloud configuration does not match this proje
Error message
Codex Security cloud configuration does not match this project's origin remote
What it means
After confirming an origin remote exists, the cloud import verifies that repositoryIdentity(origin) equals repositoryIdentity(configuration.repositoryUrl). This normalizes host/owner/repo so that URL scheme or credential differences don't matter. A mismatch means the cloud configuration belongs to a different repository than the local checkout, and importing it would attach another project's scan configuration.
Source
Thrown at packages/coding-agent/src/security/cloud.ts:592
} catch {
return trimmed.toLowerCase();
}
}
async function assertCloudRepositoryMatchesStore(
configuration: CodexSecurityCloudConfiguration,
store: SecurityStore,
signal?: AbortSignal,
): Promise<void> {
const repo = vcs.git(store.repositoryRoot);
const origin = repo ? await repo.remoteUrl("origin", signal).catch(() => null) : null;
if (!origin) {
throw new Error(
"Codex Security cloud import requires a verifiable repository identity; this project has no 'origin' remote",
);
}
if (repositoryIdentity(origin) !== repositoryIdentity(configuration.repositoryUrl)) {
throw new Error("Codex Security cloud configuration does not match this project's origin remote");
}
}
function reportForCloudBundle(
configuration: CodexSecurityCloudConfiguration,
stats: CodexSecurityCloudStats,
findings: SecurityFinding[],
): string {
const lines = [
"# Codex Security cloud results",
"",
`- Configuration: ${configuration.id}`,
`- Repository: ${configuration.repositoryUrl}`,
`- Current step: ${stats.currentStep ?? configuration.currentStep ?? "unknown"}`,
`- Last scanned commit: ${stats.lastScannedCommit ?? "unknown"}`,
`- Findings imported: ${findings.length}`,
"",
"## Findings",View on GitHub (pinned to 9690622007)
Solutions
- Update the cloud configuration's repositoryUrl to match the current origin remote
- Re-create the cloud scan configuration against the correct repository
- If the repo was renamed, update origin (git remote set-url origin <new-url>) AND the cloud config so both identities agree
- Compare repositoryIdentity outputs for both URLs to spot normalization differences (owner case, .git suffix)
Example fix
// before (cloud config points at old org) $`git remote set-url origin https://github.com/neworg/repo.git`; // after — also update the cloud configuration configuration.repositoryUrl = "https://github.com/neworg/repo.git"; await importCloudConfiguration(store, configuration);
Defensive patterns
Strategy: validation
Validate before calling
const origin = await repo.remoteUrl("origin");
if (repositoryIdentity(origin) !== repositoryIdentity(configuration.repositoryUrl)) {
throw new Error(`Cloud config targets ${configuration.repositoryUrl}, local origin is ${origin}`);
} Try / catch
try {
await importCloudConfiguration(store, configuration);
} catch (err) {
if (err instanceof Error && err.message.includes("does not match this project's origin")) {
// re-fetch or re-create the cloud configuration for this repo
} else throw err;
} Prevention
- Re-fetch the cloud configuration after any repo rename/transfer on the host
- Compare normalized identities (host/org/repo) before wiring a config to a checkout
- Avoid copying cloud configs between forks
- Keep origin URLs canonical (one scheme) across your team
When it happens
Trigger: Importing a Codex Security cloud configuration whose repositoryUrl points to a different repo (or differently-cased/renamed org) than the local project's origin remote.
Common situations: Repository was renamed or transferred on the host after the cloud config was created; origin URL changed from ssh to https with an owner casing difference that the identity normalizer does not treat as equal; copying a config between two forks; wrong profile/worktree pointing at a different repo.
Related errors
- Codex Security cloud import requires a verifiable repository
- not a repository: {path}
- reference not found: {name}
- object not found: {spec}
- cherry-pick of {sha} is empty
AI-assisted analysis of can1357/oh-my-pi@9690622007 (2026-08-31).
Data as JSON: /api/errors/b0e66633a9d7d6f4.
Report an issue: GitHub.