[GH-ISSUE #3654] [BUG]: cannot get Github Data Connector to fetch data #2358

Closed
opened 2026-02-22 18:29:20 -05:00 by yindo · 2 comments
Owner

Originally created by @sebastienb on GitHub (Apr 15, 2025).
Original GitHub issue: https://github.com/Mintplex-Labs/anything-llm/issues/3654

How are you running AnythingLLM?

Docker (local)

What happened?

I've tried using both a public and private repo, tried with and without an access token and i get the same error

[collector] error: Error: Unable to fetch repository files: 404 {"message":"Not Found","documentation_url":"https://docs.github.com/rest/repos/contents#get-repository-content","status":"404"}

More of the logs

[collector] info: Loading GitHub loader function...

[collector] info: Fetching page 0 of branches for myrepo.git

[collector] info: RepoLoader.branches Error: Invalid request to Github API: Not Found

    at /app/collector/utils/extensions/RepoLoader/GithubRepo/RepoLoader/index.js:182:17

    at process.processTicksAndRejections (node:internal/process/task_queues:95:5)

    at async GitHubRepoLoader.getRepoBranches (/app/collector/utils/extensions/RepoLoader/GithubRepo/RepoLoader/index.js:168:7)

    at async #validBranch (/app/collector/utils/extensions/RepoLoader/GithubRepo/RepoLoader/index.js:67:5)

    at async GitHubRepoLoader.init (/app/collector/utils/extensions/RepoLoader/GithubRepo/RepoLoader/index.js:109:5)

    at async loadGithubRepo (/app/collector/utils/extensions/RepoLoader/GithubRepo/index.js:17:3)

    at async /app/collector/extensions/index.js:37:43

[collector] info: [GitHub Loader]: Branch not set! Auto-assigning to a default branch.

[collector] info: [GitHub Loader]: Branch auto-assigned to master.

[collector] info: -- Working GitHub someprovate.repo.git:master --

[collector] info: [GitHub Loader]: Access token set! Recursive loading enabled!

[collector] info: Loading documents from https://github.com/someprovate.repo.git/...

[collector] info: Fetching https://api.github.com/repos/someprovate.repo.git/contents/?ref=master

[collector] info: Fetching https://api.github.com/repos/someprovate.repo.git/contents/?ref=master

[collector] info: Fetching https://api.github.com/repos/someprovate.repo.git/contents/?ref=master

Failed to process directory: , Error: Unable to fetch repository files: 404 {"message":"Not Found","documentation_url":"https://docs.github.com/rest/repos/contents#get-repository-content","status":"404"}

[collector] error: Error: Unable to fetch repository files: 404 {"message":"Not Found","documentation_url":"https://docs.github.com/rest/repos/contents#get-repository-content","status":"404"}

    at /app/collector/node_modules/@langchain/community/dist/document_loaders/web/github.cjs:556:23

    at process.processTicksAndRejections (node:internal/process/task_queues:95:5)

    at async RetryOperation._fn (/app/collector/node_modules/p-retry/index.js:50:12)

Are there known steps to reproduce?

Go to the data connector view of a workflow and try to fetch using the Github Repo

Originally created by @sebastienb on GitHub (Apr 15, 2025). Original GitHub issue: https://github.com/Mintplex-Labs/anything-llm/issues/3654 ### How are you running AnythingLLM? Docker (local) ### What happened? I've tried using both a public and private repo, tried with and without an access token and i get the same error `[collector] error: Error: Unable to fetch repository files: 404 {"message":"Not Found","documentation_url":"https://docs.github.com/rest/repos/contents#get-repository-content","status":"404"}` More of the logs ```bash [collector] info: Loading GitHub loader function... [collector] info: Fetching page 0 of branches for myrepo.git [collector] info: RepoLoader.branches Error: Invalid request to Github API: Not Found at /app/collector/utils/extensions/RepoLoader/GithubRepo/RepoLoader/index.js:182:17 at process.processTicksAndRejections (node:internal/process/task_queues:95:5) at async GitHubRepoLoader.getRepoBranches (/app/collector/utils/extensions/RepoLoader/GithubRepo/RepoLoader/index.js:168:7) at async #validBranch (/app/collector/utils/extensions/RepoLoader/GithubRepo/RepoLoader/index.js:67:5) at async GitHubRepoLoader.init (/app/collector/utils/extensions/RepoLoader/GithubRepo/RepoLoader/index.js:109:5) at async loadGithubRepo (/app/collector/utils/extensions/RepoLoader/GithubRepo/index.js:17:3) at async /app/collector/extensions/index.js:37:43 [collector] info: [GitHub Loader]: Branch not set! Auto-assigning to a default branch. [collector] info: [GitHub Loader]: Branch auto-assigned to master. [collector] info: -- Working GitHub someprovate.repo.git:master -- [collector] info: [GitHub Loader]: Access token set! Recursive loading enabled! [collector] info: Loading documents from https://github.com/someprovate.repo.git/... [collector] info: Fetching https://api.github.com/repos/someprovate.repo.git/contents/?ref=master [collector] info: Fetching https://api.github.com/repos/someprovate.repo.git/contents/?ref=master [collector] info: Fetching https://api.github.com/repos/someprovate.repo.git/contents/?ref=master Failed to process directory: , Error: Unable to fetch repository files: 404 {"message":"Not Found","documentation_url":"https://docs.github.com/rest/repos/contents#get-repository-content","status":"404"} [collector] error: Error: Unable to fetch repository files: 404 {"message":"Not Found","documentation_url":"https://docs.github.com/rest/repos/contents#get-repository-content","status":"404"} at /app/collector/node_modules/@langchain/community/dist/document_loaders/web/github.cjs:556:23 at process.processTicksAndRejections (node:internal/process/task_queues:95:5) at async RetryOperation._fn (/app/collector/node_modules/p-retry/index.js:50:12) ``` ### Are there known steps to reproduce? Go to the data connector view of a workflow and try to fetch using the Github Repo
yindo added the possible bug label 2026-02-22 18:29:20 -05:00
yindo closed this issue 2026-02-22 18:29:20 -05:00
Author
Owner

@sebastienb commented on GitHub (Apr 15, 2025):

the issue was me using .git in the url of my repo. Removing it fixed the issue

@sebastienb commented on GitHub (Apr 15, 2025): the issue was me using .git in the url of my repo. Removing it fixed the issue
Author
Owner

@timothycarambat commented on GitHub (Apr 15, 2025):

Reasonble mistake to make - fixing with https://github.com/Mintplex-Labs/anything-llm/pull/3655

@timothycarambat commented on GitHub (Apr 15, 2025): Reasonble mistake to make - fixing with https://github.com/Mintplex-Labs/anything-llm/pull/3655
yindo changed title from [BUG]: cannot get Github Data Connector to fetch data to [GH-ISSUE #3654] [BUG]: cannot get Github Data Connector to fetch data 2026-06-05 14:46:06 -04:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: Mintplex-Labs/anything-llm#2358