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
- Point the import URL at the folder that actually contains the skill files (e.g. the repo root or the skill directory)
- Verify the folder is non-empty on the exact branch/ref in the URL
- Check path casing matches the repository exactly
- 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
- Point the import path at the folder containing the skill files, not an assets/docs folder
- Match path casing exactly — git hosts are case-sensitive
- Confirm the folder exists on the branch named in the URL
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
- Repository or path not found. Please check the URL and ensur
- API rate limit exceeded. ${limit} requests/hour for unauthen
- Failed to fetch: ${message}
- Download URL not available for file: ${file.path}
- Failed to download ${file.path}: ${response.status} ${respon
AI-assisted analysis of infiniflow/ragflow@554fb1133a (2026-08-15).
Data as JSON: /api/errors/a01921ccc1789f3a.
Report an issue: GitHub.