GitHub
Connect your GitHub repositories to SurfSense
GitHub Integration Setup Guide
Indexing deprecated
The GitHub indexing pipeline is currently deprecated — the knowledge base now stores files, notes, and uploads only. Existing GitHub connectors remain manageable, but new indexing runs are refused by the backend.
This guide walks you through connecting your GitHub repositories to SurfSense for code search and AI-powered insights.
How it works
The GitHub connector uses gitingest to fetch and process repository contents from GitHub.
- For follow-up indexing runs, the connector retrieves the latest repository state and updates changed files.
- Indexing should be configured to run periodically, so updates should appear in your search results within minutes.
What Gets Indexed
| Content Type | Examples |
|---|---|
| Code Files | Python, JavaScript, TypeScript, Go, Rust, Java, etc. |
| Documentation | README files, Markdown documents, text files |
| Configuration | JSON, YAML, TOML, .env examples, Dockerfiles |
Binary files and files larger than 5MB are automatically excluded.
Quick Start (Public Repos)
- Navigate to Connectors → Add Connector → GitHub
- Enter repository names:
owner/repo(e.g.,facebook/react, vercel/next.js) - Click Connect GitHub
No authentication required for public repositories.
Private Repositories
For private repos, you need a GitHub Personal Access Token (PAT).
Generate a PAT
- Go to GitHub's token creation page (pre-filled with
reposcope) - Set an expiration
- Click Generate token and copy it
The token starts with ghp_. Store it securely.
Periodic Sync
Enable periodic sync to automatically re-index repositories when content changes. Available frequencies: Every 5 minutes, 15 minutes, hourly, every 6 hours, daily, or weekly.
Connector Configuration
| Field | Description | Required |
|---|---|---|
| Connector Name | A friendly name to identify this connector | Yes |
| GitHub Personal Access Token | Your PAT (only for private repos) | No |
| Repository Names | Comma-separated list: owner/repo1, owner/repo2 | Yes |
Troubleshooting
Repository not found
- Verify format is
owner/repo - For private repos, ensure PAT has access
Authentication failed
- Check PAT is valid and not expired
- Token should start with
ghp_orgithub_pat_
Rate limit exceeded
- Use a PAT for higher limits (5,000/hour vs 60 unauthenticated)
- Reduce sync frequency