abpframework/abp · error · ApplicationException
repositoryNameWithOrganization '{repositoryNameWithOrganizat
Error message
repositoryNameWithOrganization '{repositoryNameWithOrganization}' is not valid! It should be formatted as 'organization-name/repository-name'. What it means
Thrown by the `GithubRepositoryInfo` constructor when `repositoryNameWithOrganization` does not contain a `/` character, i.e. it is not in the `organization/repository` format. It is an `ApplicationException`. The constructor then splits on `/` to derive the repository name.
Source
Thrown at framework/src/Volo.Abp.Cli.Core/Volo/Abp/Cli/ProjectBuilding/Building/GithubRepositoryInfo.cs:17
using System;
namespace Volo.Abp.Cli.ProjectBuilding.Building;
public class GithubRepositoryInfo
{
public string RepositoryNameWithOrganization { get; }
public string RepositoryName { get; }
public string AccessToken { get; }
public GithubRepositoryInfo(string repositoryNameWithOrganization, string accessToken)
{
if (!repositoryNameWithOrganization.Contains("/"))
{
throw new ApplicationException($"{nameof(repositoryNameWithOrganization)} '{repositoryNameWithOrganization}' is not valid! It should be formatted as 'organization-name/repository-name'.");
}
RepositoryNameWithOrganization = repositoryNameWithOrganization;
RepositoryName = repositoryNameWithOrganization.Split('/')[1];
AccessToken = accessToken;
}
}
View on GitHub (pinned to 7ed43b1931)
Solutions
- Format the value as `organization/repository`, e.g. `abpframework/abp`.
- If you meant a local path or URL, use the appropriate `template-source` form instead of the GitHub slug.
- Optionally pass a GitHub access token as the second constructor argument once the slug is correct.
Example fix
// before
new GithubRepositoryInfo("myrepo", token);
// after
new GithubRepositoryInfo("acme/myrepo", token); Defensive patterns
Strategy: validation
Validate before calling
static bool IsValidRepoSlug(string slug) =>
!string.IsNullOrWhiteSpace(slug) && slug.Count(c => c == '/') == 1 && !slug.StartsWith("/") && !slug.EndsWith("/");
if (!IsValidRepoSlug(repositoryNameWithOrganization))
throw new ArgumentException("Expected 'organization/repository'.", nameof(repositoryNameWithOrganization)); Type guard
static bool IsGithubRepoSlug(string value) =>
!string.IsNullOrEmpty(value)
&& value.Split('/', StringSplitOptions.None) is { Length: 2 } parts
&& !string.IsNullOrWhiteSpace(parts[0])
&& !string.IsNullOrWhiteSpace(parts[1]); Try / catch
try { var info = new GithubRepositoryInfo(slug, token); }
catch (ApplicationException ex) when (ex.Message.Contains("organization-name/repository-name"))
{
logger.LogError("Invalid repo slug '{Slug}'. Use 'org/repo'.", slug);
throw;
} Prevention
- Always provide the organization prefix when referencing GitHub repos.
- Validate the slug format in UI/scripts before submission.
- Copy the slug from the GitHub URL path (after the domain).
When it happens
Trigger: Providing a local module/template source as a GitHub repo reference (e.g. via `--template-source`/module source) using a bare repository name like `myrepo` instead of `acme/myrepo`.
Common situations: Typing the repo without the org prefix; copying just the repo name from a URL; using an SSH/HTTPS URL where the CLI expects the `org/repo` slug.
Related errors
- Can not set {companyName} if {companyNamePlaceHolder} is nul
- Solution name is not valid. It should be 1 character length
- Solution name is not valid. Company name should be 1 charact
- Solution name is not valid. Project name should be 1 charact
- DbMigrations folder path is missing!
AI-assisted analysis of abpframework/abp@7ed43b1931 (2026-08-13).
Data as JSON: /api/errors/353df1b289f10a61.
Report an issue: GitHub.