Set Up GitHub Connector (OAuth or PAT)
Authenticate your agent to github.com using OAuth or a Personal Access Token. You can start from Builder -> Connectors or from Builder -> Code Access — both paths open the same authentication dialog and store the same credentials.
An authenticated GitHub connection so your agent can search code, manage issues, pull requests, and trigger workflows — depending on the permissions you grant. Learn more → GitHub Connector.
Prerequisites
- An active agent in Running state
- Access to
github.comrepositories you want the agent to use - Agent role: Administrator or Standard User
Step 1: Open GitHub authentication
Option A: Navigate to Builder -> Connectors, click Add connector, and select GitHub OAuth connector.
Option B: Navigate to Builder -> Code Access and click Add repositories. This opens the same authentication dialog.
If the left navigation does not open Connectors on the first click, refresh the agent page, expand Builder again, and retry.
Step 2: Choose authentication
Choose one method:
| Method | When to use |
|---|---|
| OAuth | Interactive setup for user-driven access |
| PAT | Service account or non-interactive setup |
OAuth flow
- Select OAuth.
- Click Sign in to GitHub.
- Complete the GitHub popup authorization.
- Confirm status shows Connected.
PAT flow
- Select PAT.
- Paste a GitHub token with required scopes.
- Click Connect.
- Confirm status shows Connected.
Step 3: Confirm runtime operations
After saving the connector, test with a chat prompt such as:
List recent issues from owner/repo and summarize the top 3 risks.
If your environment enables PR actions, you can also test a PR-related prompt.
Use a direct verification prompt as a final checkpoint:
Get me recent issues from owner/repo.
Required permissions by operation
| Operation | OAuth/PAT minimum |
|---|---|
| Read repository metadata/content | repo for private repos (public_repo for public-only) |
| List or create issues | issue-capable repo access |
| Pull request operations | PR-capable repo access |
Troubleshooting
| Symptom | Likely cause | Fix |
|---|---|---|
| Connector shows disconnected | Token expired or revoked | Re-authenticate OAuth or rotate PAT |
| Issue reads work, PR actions fail | Missing PR permission | Grant PR permission and retry |
| Connector cannot access private repos | Token scope too narrow | Use repo scope for private repos |
| Popup does not open | Browser popup blocked | Allow popups for the portal domain |
Related
| Resource | What you'll learn |
|---|---|
| GitHub Connector | Path selection and auth matrix |
| Set Up GitHub BYO App Connector | App-based auth for enterprise governance |
| Connect Source Code | Code Access path for repository indexing |
| Set Up MCP Connector | GitHub MCP path |
| Connect GitHub Enterprise Cloud | BYO App path for *.ghe.com |