phacility/phabricator · error · Exception
This repository ("%s") is not a Git repository. Use "%s" to
Error message
This repository ("%s") is not a Git repository. Use "%s" to interact with this repository. What it means
DiffusionGitSSHWorkflow serves git-upload-pack/git-receive-pack over SSH. When the repository identified from the SSH path exists but its version control system is not Git, raiseWrongVCSException throws and names the repository's actual VCS so the right client is used.
Source
Thrown at src/applications/diffusion/ssh/DiffusionGitSSHWorkflow.php:57
PhabricatorRepositoryType::REPOSITORY_TYPE_GIT);
}
protected function waitForGitClient() {
$io_channel = $this->getIOChannel();
// If we don't wait for the client to close the connection, `git` will
// consider it an early abort and fail. Sit around until Git is comfortable
// that it really received all the data.
while ($io_channel->isOpenForReading()) {
$io_channel->update();
$this->getErrorChannel()->flush();
PhutilChannel::waitForAny(array($io_channel));
}
}
protected function raiseWrongVCSException(
PhabricatorRepository $repository) {
throw new Exception(
pht(
'This repository ("%s") is not a Git repository. Use "%s" to '.
'interact with this repository.',
$repository->getDisplayName(),
$repository->getVersionControlSystem()));
}
protected function newPassthruCommand() {
return parent::newPassthruCommand()
->setWillWriteCallback(array($this, 'willWriteMessageCallback'))
->setWillReadCallback(array($this, 'willReadMessageCallback'));
}
protected function newProtocolLog($is_proxy) {
if ($is_proxy) {
return null;
}
View on GitHub (pinned to 5720a38cfe)
Solutions
- Use the client matching the repository (hg or svn) with the exact URI shown on its Diffusion main page
- If the repository should be Git and is empty or misconfigured, recreate it with the correct VCS type
- Check the repository's Version Control System setting under Manage
Defensive patterns
Strategy: validation
Validate before calling
// Confirm VCS matches before launching the Git SSH workflow
if ($repository->getVersionControlSystem() !==
PhabricatorRepositoryType::REPOSITORY_TYPE_GIT) {
// tell the client to use the VCS-appropriate tool
} Prevention
- Always copy clone URIs from the repository's Diffusion page rather than guessing
- Double-check the VCS type when creating repositories
- In mixed-VCS installs, prefix clone URLs per VCS in your documentation
When it happens
Trigger: Running git clone ssh://<user>@<host>/diffusion/<CALLSIGN>/ (or git fetch/push) against a repository configured as Mercurial or Subversion.
Common situations: Copying the wrong clone URL from another repository; creating the repository with the wrong VCS type; muscle-memory git usage on mixed-VCS installs.
Related errors
- This repository ("%s") is not a Mercurial repository. Use "%
- This public key is already associated with another user or d
- Analyzing or decrypting SSH keys requires the "ssh-keygen" b
- A passphrase was provided for this private key, but it does
- This private key is not formatted correctly. Check that you
AI-assisted analysis of phacility/phabricator@5720a38cfe (2026-08-21).
Data as JSON: /api/errors/f23d1e2b68f63c4e.
Report an issue: GitHub.