phacility/phabricator · error · Exception

The name " " is not a valid repository short name…

Error message

The name "%s" is not a valid repository short name. Repository short names must begin with a letter or number.

What it means

Fires from assertValidRepositorySlug when the name does not begin with an ASCII letter or digit. Leading separators like '.', '-' or '_' are forbidden to keep generated URIs unambiguous; the guard runs during transaction validation and interpolates the faulty name.

Solutions

  1. Start the short name with a letter or number.
Defensive patterns

Strategy: validation

When it happens

Trigger: Thrown at src/applications/repository/storage/PhabricatorRepository.php:396 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/e3829a34955dfb29. Report an issue: GitHub.

Appendix: source

Thrown at src/applications/repository/storage/PhabricatorRepository.php:396

    if (strlen($slug) > 64) {
      throw new Exception(
        pht(
          'The name "%s" is not a valid repository short name. Repository '.
          'short names must not be longer than 64 characters.',
          $slug));
    }

    if (preg_match('/[^a-zA-Z0-9._-]/', $slug)) {
      throw new Exception(
        pht(
          'The name "%s" is not a valid repository short name. Repository '.
          'short names may only contain letters, numbers, periods, hyphens '.
          'and underscores.',
          $slug));
    }

    if (!preg_match('/^[a-zA-Z0-9]/', $slug)) {
      throw new Exception(
        pht(
          'The name "%s" is not a valid repository short name. Repository '.
          'short names must begin with a letter or number.',
          $slug));
    }

    if (!preg_match('/[a-zA-Z0-9]\z/', $slug)) {
      throw new Exception(
        pht(
          'The name "%s" is not a valid repository short name. Repository '.
          'short names must end with a letter or number.',
          $slug));
    }

    if (preg_match('/__|--|\\.\\./', $slug)) {
      throw new Exception(
        pht(
          'The name "%s" is not a valid repository short name. Repository '.

View on GitHub (pinned to 5720a38cfe)