Skip to main content

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.

What you'll build

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.com repositories 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.

Connectors list page with GitHub connector setup entry

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:

MethodWhen to use
OAuthInteractive setup for user-driven access
PATService account or non-interactive setup

OAuth flow

  1. Select OAuth.
  2. Click Sign in to GitHub.
  3. Complete the GitHub popup authorization.
  4. Confirm status shows Connected.
Add connector dialog showing GitHub OAuth connector option

PAT flow

  1. Select PAT.
  2. Paste a GitHub token with required scopes.
  3. Click Connect.
  4. 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

OperationOAuth/PAT minimum
Read repository metadata/contentrepo for private repos (public_repo for public-only)
List or create issuesissue-capable repo access
Pull request operationsPR-capable repo access

Troubleshooting

SymptomLikely causeFix
Connector shows disconnectedToken expired or revokedRe-authenticate OAuth or rotate PAT
Issue reads work, PR actions failMissing PR permissionGrant PR permission and retry
Connector cannot access private reposToken scope too narrowUse repo scope for private repos
Popup does not openBrowser popup blockedAllow popups for the portal domain
ResourceWhat you'll learn
GitHub ConnectorPath selection and auth matrix
Set Up GitHub BYO App ConnectorApp-based auth for enterprise governance
Connect Source CodeCode Access path for repository indexing
Set Up MCP ConnectorGitHub MCP path
Connect GitHub Enterprise CloudBYO App path for *.ghe.com
Was this page helpful?