coleam00/Archon · error
Repository ${owner}/${repo} not found or is private. Check r
Error message
Repository ${owner}/${repo} not found or is private. Check repository access. What it means
GitHubAdapter.ensureRepoReady throws this when the git clone of https://github.com/${owner}/${repo}.git fails with error code 'not_a_repo', meaning git could not find a repository at that URL. Archon maps the low-level clone failure to a user-facing message distinguishing 'repo missing/private' from auth problems. It is thrown while preparing the codebase during webhook handling.
Source
Thrown at packages/adapters/src/forge/github/adapter.ts:758
} else {
ghToken = process.env.GITHUB_TOKEN ?? process.env.GH_TOKEN;
}
const repoUrl = `https://github.com/${owner}/${repo}.git`;
const cloneResult = await cloneRepository(
repoUrl,
toRepoPath(repoPath),
ghToken ? { token: ghToken } : undefined
);
if (!cloneResult.ok) {
getLog().error(
{ error: cloneResult.error, owner, repo, repoPath },
'github.repo_clone_failed'
);
if (cloneResult.error.code === 'not_a_repo') {
throw new Error(
`Repository ${owner}/${repo} not found or is private. Check repository access.`
);
} else if (cloneResult.error.code === 'permission_denied') {
const authHint =
this.auth.kind === 'app'
? 'Check that the Archon GitHub App is installed on the org and has the Contents:Read permission.'
: 'Check GITHUB_TOKEN permissions.';
throw new Error(`Authentication failed for ${owner}/${repo}. ${authHint}`);
}
throw new Error(
`Failed to clone ${owner}/${repo}: ${'message' in cloneResult.error ? cloneResult.error.message : cloneResult.error.code}`
);
}
await addSafeDirectory(toRepoPath(repoPath));
// App mode: install the git credential helper on the newly cloned worktree
// so workflows that outlive the 1h installation-token expiry can refreshView on GitHub (pinned to 0773b97458)
Solutions
- Verify the repo exists at github.com/${owner}/${repo} and the spelling matches the webhook payload.
- If the repo is private, confirm credentials: install the Archon GitHub App on the org or set a GITHUB_TOKEN with access to that repo.
- Check the structured log 'github.repo_clone_failed' for the raw cloneResult.error to confirm it is genuinely a 404/not_a_repo and not an auth issue.
- If the repo was renamed, update stored repo identifiers and re-trigger the webhook.
Example fix
// before: webhook payload references old repo name
handleWebhook({ owner: 'acme', repo: 'old-name' })
// after: corrected/re-registered repo
handleWebhook({ owner: 'acme', repo: 'renamed-repo' }) Defensive patterns
Strategy: validation
Validate before calling
// Before handling the webhook, confirm access to the repo
const res = await fetch(`https://api.github.com/repos/${owner}/${repo}`, {
headers: { Authorization: `Bearer ${token}`, Accept: 'application/vnd.github+json' },
});
if (res.status === 404) throw new Error(`Repo ${owner}/${repo} is inaccessible with current credentials`); Try / catch
try {
await adapter.handleWebhook(payload);
} catch (err) {
if (err instanceof Error && /not found or is private\. Check repository access/.test(err.message)) {
// surface repo-visibility/access guidance to the operator
}
} Prevention
- Validate owner/repo against the GitHub API during webhook registration.
- Keep the GitHub App installation covering all target repos with Contents:Read.
- Monitor for repo rename/delete events and update stored identifiers.
When it happens
Trigger: Calling handleWebhook (which calls ensureRepoReady) for an owner/repo that does not exist, was renamed/deleted, or is private while the configured credentials (GitHub App installation or GITHUB_TOKEN) cannot see it.
Common situations: Typo in repo name from webhook payload; repo made private after initial setup; token belongs to a user without access; GitHub App not installed on that repo/org so the installation token cannot resolve it.
Related errors
- Authentication failed for ${owner}/${repo}. ${authHint}
- Failed to clone ${owner}/${repo}: ${'message' in cloneResult
- Repository ${owner}/${repo} not found or is private. Check r
- Failed to clone ${owner}/${repo}: ${unknownMsg}
- Failed to set up GitHub conversation - please try again
AI-assisted analysis of coleam00/Archon@0773b97458 (2026-09-01).
Data as JSON: /api/errors/393e5319002533f4.
Report an issue: GitHub.