phacility/phabricator · error · Exception

Repository " " is not a Git repository. Git LFS is only…

Error message

Repository "%s" is not a Git repository. Git LFS is only supported for Git repositories.

What it means

Repository-type guard in executeRepositoryOperations: the repository resolved from the LFS path is not a Git repository (isGit() is false). Git LFS only applies to Git repositories, so any Subversion or Mercurial repository reached through git-lfs-authenticate is rejected here.

Solutions

  1. Point the LFS client at the correct Git repository
  2. Do not attempt to use Git LFS with SVN or Mercurial repositories
Defensive patterns

Strategy: validation

When it happens

Trigger: Thrown at src/applications/diffusion/gitlfs/DiffusionGitLFSAuthenticateWorkflow.php:65 when the library encounters an invalid state.

Common situations: See trigger scenarios.


AI-assisted analysis of phacility/phabricator@5720a38cfe (2026-08-21). Data as JSON: /api/errors/6995713495485365. Report an issue: GitHub.

Appendix: source

Thrown at src/applications/diffusion/gitlfs/DiffusionGitLFSAuthenticateWorkflow.php:65

    // NOTE: We aren't checking write access here, even for "upload". The
    // HTTP endpoint should be able to do that for us.

    switch ($operation) {
      case 'upload':
      case 'download':
        break;
      default:
        throw new Exception(
          pht(
            'Git LFS operation "%s" is not supported by this server.',
            $operation));
    }

    $repository = $this->getRepository();

    if (!$repository->isGit()) {
      throw new Exception(
        pht(
          'Repository "%s" is not a Git repository. Git LFS is only '.
          'supported for Git repositories.',
          $repository->getDisplayName()));
    }

    if (!$repository->canUseGitLFS()) {
      throw new Exception(
        pht('Git LFS is not enabled for this repository.'));
    }

    // NOTE: This is usually the same as the default URI (which does not
    // need to be specified in the response), but the protocol or domain may
    // differ in some situations.

    $lfs_uri = $repository->getGitLFSURI('info/lfs');

    // Generate a temporary token to allow the user to access LFS over HTTP.

View on GitHub (pinned to 5720a38cfe)