> For the complete documentation index, see [llms.txt](https://doc.duaer.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://doc.duaer.com/guides/github-knowledge-search.md).

# Search GitHub in your knowledge base with Duaer

Connect GitHub to the Duaer knowledge base. People ask about issues, pull requests and docs; private repositories follow GitHub read access.
## What does Duaer find in GitHub?

Duaer indexes the 100 repositories pushed to most recently: in each, the 500 most recently updated issues and pull requests with their comments, and Markdown files on the default branch such as the README and the docs folder, up to 200 per repository. Code is not indexed.

People can ask “How did we fix the invoice that was off by a cent?”. Duaer finds the answer in the issue comments and cites it, and the citation opens the issue on GitHub.

## How do you connect GitHub to Duaer?

1. In GitHub, create a personal access token: a classic token with the repo, read:org and read:user scopes, or a fine-grained token with read access to contents, issues, pull requests and metadata. The account must see the repositories people should be able to search.
2. In Duaer, create a GitHub API credential with that token; for GitHub Enterprise, also fill in the server (for example https://git.acme.com/api/v3). A GitHub OAuth2 API credential works too.
3. As an owner or admin, open Knowledge base › Data sources, choose the credential on the GitHub card and click Connect.
4. When indexing is done, ask a question whose answer is in an issue or a README and check that the citation points there.

## Who finds the content of which repository?

- Public repositories: the whole Duaer organization.
- Private and internal repositories: people with read access to the repository on GitHub, including collaborators, team members and organization members through base permissions.

GitHub users are matched to Duaer members by their public email and, for an organization’s repository, by their verified email in that organization. People who match no member do not find private repositories, and the source card counts the items this affects. When the token cannot list a private repository’s collaborators (that needs push access), the repository opens to no member and the card names the missing scope.

## What are the limits?

- Up to 100 repositories; per repository up to 500 issues and pull requests and 200 Markdown files of at most 1 MB; up to the first 100 comments of each issue.
- Code, Discussions, Wikis, pull request review comments, releases and Actions are not indexed.

To see how Duaer puts knowledge search and follow-through together, open the [Duaer home page](https://www.duaer.com/).
## Questions

### Does Duaer change anything on GitHub?

No. Duaer only reads issues, pull requests and docs to index them. It never writes or comments.

### Does Duaer index code from GitHub?

No. It indexes issues, pull requests and Markdown files on the default branch only.

### Which token scopes does Duaer need for GitHub?

A classic token needs repo, read:org and read:user; a fine-grained token needs read access to contents, issues, pull requests and metadata.

## Related

- [Turn SharePoint and Google Drive into a Q&A knowledge base with Duaer](https://doc.duaer.com/guides/sharepoint-drive-knowledge-base.md)
- [Permission-aware enterprise AI search: how Duaer keeps document access intact](https://doc.duaer.com/guides/permission-aware-ai-search.md)
- [Search ServiceNow in your knowledge base with Duaer](https://doc.duaer.com/guides/servicenow-knowledge-search.md)
- [Search Zendesk tickets and articles with Duaer](https://doc.duaer.com/guides/zendesk-knowledge-search.md)
- [AI answers with citations and no hallucination: how Duaer does it](https://doc.duaer.com/guides/ai-answers-with-citations.md)

