这是indexloc提供的服务,不要输入任何密码
Skip to content

[BUG]: cannot get Github Data Connector to fetch data #3654

@sebastienb

Description

@sebastienb

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    possible bugBug was reported but is not confirmed or is unable to be replicated.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions