paperclipai/paperclip · error

Enter a GitHub repository URL.

Error message

Enter a GitHub repository URL.

What it means

preparedConfig() in NewAgentSetup validates adapter-specific requirements. For the cursor_cloud adapter type the repository field must be a GitHub repository URL matching ^https://github.com/owner/repo; anything else throws "Enter a GitHub repository URL." This prevents creating a Cursor Cloud agent without a valid repo target.

Source

Thrown at ui/src/components/new-agent/NewAgentSetup.tsx:380

        KIMI_MODEL_NAME: { type: "plain", value: kimiModel.trim() },
        KIMI_MODEL_PROVIDER_TYPE: { type: "plain", value: kimiProtocol },
        ...(kimiBaseUrl.trim()
          ? {
              KIMI_MODEL_BASE_URL: { type: "plain", value: kimiBaseUrl.trim() },
            }
          : {}),
      };
    }
    return config;
  }
  function preparedConfig(nextConnection = connection) {
    if (multiProvider && (!model.trim() || !model.includes("/")))
      throw new Error("Choose or enter a model in provider/model format.");
    if (
      adapterType === "cursor_cloud" &&
      !/^https:\/\/github\.com\/[^/]+\/[^/]+/.test(repository.trim())
    )
      throw new Error("Enter a GitHub repository URL.");
    if (
      ["cursor_cloud", "hermes_gateway"].includes(adapterType) &&
      !apiKey.trim() &&
      !selectedBinding
    )
      throw new Error(
        adapterType === "cursor_cloud"
          ? "Enter a Cursor API key."
          : `Enter ${envKey} or select an organization secret.`,
      );
    if (adapterType === "hermes_gateway") {
      try {
        const url = new URL(gatewayUrl.trim());
        if (!["https:", "http:"].includes(url.protocol)) throw new Error();
      } catch {
        throw new Error("Enter the Hermes API base URL.");
      }
    }

View on GitHub (pinned to 01ad858492)

Solutions

  1. Enter the repository as an https GitHub URL of the form https://github.com/owner/repo.
  2. Copy the URL from the repo's GitHub page "Code" button rather than from a git remote.
  3. Convert SSH remotes: git@github.com:owner/repo.git becomes https://github.com/owner/repo.
  4. Choose a different adapter type if the target repository is not hosted on github.com.

Example fix

// before
repository: "git@github.com:acme/widgets.git"

// after
repository: "https://github.com/acme/widgets"
Defensive patterns

Strategy: validation

Validate before calling

const repoOk =
  adapterType !== "cursor_cloud" ||
  /^https:\/\/github\.com\/[^/]+\/[^/]+/.test(repository.trim());
if (!repoOk) showError("Enter a GitHub repository URL.");

Type guard

const isGitHubRepoUrl = (s: string): boolean =>
  /^https:\/\/github\.com\/[^/]+\/[^/]+/.test(s.trim());

Try / catch

try {
  const cfg = preparedConfig();
  submit(cfg);
} catch (e) {
  if (e instanceof Error && e.message === "Enter a GitHub repository URL.") {
    setRepoFieldError("Use an https://github.com/owner/repo URL.");
  } else throw e;
}

Prevention

When it happens

Trigger: Submitting setup with adapterType === "cursor_cloud" and repository empty, or set to a non-GitHub URL (gitlab.com, ssh URL, or a github.com URL missing owner or repo segments).

Common situations: Pasting an SSH git remote (git@github.com:owner/repo.git) instead of the HTTPS URL; leaving the field blank because Cursor Cloud was selected late in the flow; using an internal GitLab/Gitea mirror URL.

Understand the failure class

Background: "Invalid URL" errors: why new URL(), URI.parse, and reqwest::Url reject your string — missing scheme, whitespace, and bad path format — this error's family across 39 libraries.

Related errors


AI-assisted analysis of paperclipai/paperclip@01ad858492 (2026-09-10). Data as JSON: /api/errors/6480b2fb03eb453e. Report an issue: GitHub.