Skip to content
Latchkey

TeamCity "Cannot collect changes ... repository not found" in CI

The Git server responded that the repository at the VCS root URL does not exist or is not visible to the credentials. Often the URL is wrong, the repo was renamed or moved, or the token cannot see a private repository.

What this error means

The VCS root fails with "Failed to collect changes ... repository '...' not found" or "remote: Repository not found", even though the URL looks correct at a glance.

TeamCity
Failed to collect changes, error: List remote refs failed:
remote: Repository not found. fatal: repository 'https://github.com/acme/app.git/' not found

Common causes

The repository URL is wrong or the repo moved

A typo, a wrong organization, or a repository that was renamed, transferred, or deleted makes the remote unresolvable.

The credentials cannot see a private repository

For private repos, "not found" often means the token authenticated but has no access, so the host hides the repository rather than returning 403.

How to fix it

Correct the URL and confirm access

  1. Verify the exact clone URL from the repository host and paste it into the VCS root.
  2. Confirm the token or key belongs to a principal with read access to that repository.
  3. Run "Test connection" to confirm the remote resolves.

Grant the credential access to the repo

For a private repository, add the deploy key or grant the token read scope on that repo, then retry change collection.

How to prevent it

  • Update VCS root URLs when repositories are renamed or transferred.
  • Use tokens scoped to the exact repositories the server must read.
  • Verify new VCS roots with "Test connection" before enabling triggers.

Related guides

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