infiniflow/ragflow · warning · Error

No files found in the repository

Error message

No files found in the repository

What it means

Raised after fetching the git repository's file list succeeds but returns zero entries for the given path/ref. The contents API responded ok, but the directory (or repo root with a path filter) contains no files visible to the request.

Source

Thrown at web/src/pages/skills/components/upload-modal.tsx:589

          `Invalid ${PLATFORM_CONFIG[gitPlatform].name} URL format`,
        );
      }

      const { owner, repo, ref, path } = parsed;

      // 1. Fetch file list from Git API
      setGitProgress('Fetching file list...');
      const gitFiles = await fetchGitDirectoryContents(
        gitPlatform,
        owner,
        repo,
        path,
        ref,
        gitToken || undefined,
      );

      if (gitFiles.length === 0) {
        throw new Error('No files found in the repository');
      }

      // Filter out common non-skill files
      const filteredGitFiles = gitFiles.filter((f) => {
        const name = f.path.split('/').pop()?.toLowerCase();
        // Skip common non-code files
        if (
          [
            '.gitignore',
            'license',
            'copying',
            'makefile',
            'dockerfile',
          ].includes(name || '')
        ) {
          return false;
        }
        return true;

View on GitHub (pinned to 554fb1133a)

Solutions

  1. Point the import URL at the folder that actually contains the skill files (e.g. the repo root or the skill directory)
  2. Verify the folder is non-empty on the exact branch/ref in the URL
  3. Check path casing matches the repository exactly
  4. If importing a single file, ensure it is a file the API lists (not an LFS pointer or symlink)
Defensive patterns

Strategy: validation

Validate before calling

// after fetching the listing, verify there is at least one file entry
const fileEntries = gitFiles.filter((f) => f.type === 'file');
if (fileEntries.length === 0) {
  setGitValidationStatus('invalid');
  setGitValidationMessage('No downloadable files at this path — check the folder and branch.');
  return;
}

Type guard

function hasFileEntries(files: { type?: string }[]): boolean {
  return files.some((f) => f.type === 'file');
}

Try / catch

try {
  const gitFiles = await fetchGitDirectoryContents(/* ... */);
  if (gitFiles.length === 0) throw new Error('No files found in the repository');
} catch (e) {
  setGitValidationStatus('invalid');
  setGitValidationMessage(e instanceof Error ? e.message : String(e));
}

Prevention

When it happens

Trigger: The path points to an empty directory; the directory contains only subdirectories and the fetch only captured the top level; the path is a single file that was filtered out client-side; the ref is correct but the folder exists only on another branch.

Common situations: Pointing the importer at a docs/ or assets-only folder with no skill files; path casing mismatch (Path vs path) resolving to an empty listing on case-sensitive hosts; wrong branch selected.

Related errors


AI-assisted analysis of infiniflow/ragflow@554fb1133a (2026-08-15). Data as JSON: /api/errors/a01921ccc1789f3a. Report an issue: GitHub.