GitHub integration changedconnectors/github/index
Recorded here
Lines+57added
Lines−15removed
From line
1
where the diff opens
First seen
14 Aug 2026
this site's first read of the page
Recorded edits3to this page, all time
## Grant Claude access to a private repository ### Change which files Claude reads in a project ## Troubleshooting ### Add from GitHub doesn't appear in a chat ### Claude cannot access that resource ## Connect a private repository
The whole hunk
from line 1, old and new numbered
/
from line 1
11# GitHub integration
22
3> Add files and folders from your GitHub repositories to a conversation or project so Claude can read your code
3> Add a GitHub repository to a conversation, or files and folders from a repository to a project, so Claude can read your code
44
5The GitHub integration lets you add files and folders from your GitHub repositories to a conversation or a project, so Claude can read your code and answer development questions with that context. It's available on every plan, including Free, and works with public repositories and with private repositories you grant access to.
5The GitHub integration lets you add a GitHub repository to a conversation, or files and folders from a repository to a project, so Claude can read your code and answer development questions with that context. It's available on every plan, including Free, and works with public repositories and with private repositories you grant access to.
66
77By the end of this page you have added repository content to a chat or a project and asked Claude about it. Claude reads file names and contents only: it doesn't see commit history, pull requests, or issues.
88
from line 12
1212
1313## Add repository content
1414
15You can add repository content to a single conversation, or to a [project](https://support.claude.com/en/articles/9517075-what-are-projects), a workspace in Claude where a set of chats share the same background documents. Choose the tab below for where you want the content available. If you haven't signed in to GitHub from Claude yet, Claude sends you to GitHub to sign in before you continue.
15You can add repository content to a single conversation, or to a [project](https://support.claude.com/en/articles/9517075-what-are-projects), a workspace in Claude where a set of chats share the same background documents. Choose the tab below for where you want the content available.
1616
1717<Tabs>
1818 <Tab title="In a chat">
19 In a chat, the **Add from GitHub** option appears only after your GitHub account is connected to Claude. To connect your GitHub account, follow these steps:
20
21 1. Go to [**Customize > Connectors**](https://claude.ai/customize/connectors).
22 2. Select **GitHub Integration**.
23 3. Select **Connect**.
24
25 After your GitHub account is connected, add a repository to a chat:
26
1927 <Steps>
2028 <Step title="Open the add menu">
2129 In the conversation, select **+** at the lower left of the message box.
from line 33
2533 Select **Add from GitHub**.
2634 </Step>
2735
28 <Step title="Select files and folders">
29 Use the file browser to select the files and folders you want Claude to read.
36 <Step title="Pick a repository">
37 Search the repositories you have access to, or paste a repository URL.
3038 </Step>
3139
40 <Step title="Add the repository">
41 Select **Add repository**. Claude adds the repository's URL to your message.
42 </Step>
43
3244 <Step title="Send your message">
33 Write your question and send it. Claude reads and processes the selected content when you send the message.
45 Send your question.
3446 </Step>
3547 </Steps>
3648 </Tab>
from line 50
3850 <Tab title="In a project">
3951 You can add repository content only to a private project, one you haven't shared with other people. In a shared project, the **GitHub** option is dimmed and shows **Only accessible from private projects**.
4052
53 If your GitHub account isn't connected to Claude yet, selecting **GitHub** sends you to GitHub to sign in before you continue.
54
4155 <Steps>
4256 <Step title="Open project knowledge">
4357 Open the project and, in its project knowledge section, select **+**.
from line 68
5468 <Step title="Select files and folders">
5569 Use the file browser to select the files and folders you want Claude to read.
5670 </Step>
71
72 <Step title="Add the files">
73 Select **Add files**.
74 </Step>
5775 </Steps>
5876
5977 The selected content is added to the project's knowledge.
from line 78
6078 </Tab>
6179</Tabs>
6280
63## Connect a private repository
81## Grant Claude access to a private repository
6482
65If a warning appears after you enter a valid repository URL, the repository is most likely private and Claude doesn't have access to it yet. Follow the link in the warning to the Claude GitHub App, where you have two options:
83When you pick a private repository that Claude doesn't have access to yet, or paste its URL, the **Add content from GitHub** dialog shows **Claude cannot access that resource. If you know that it exists, you may first need to grant or request access here.** The **here** link in that message opens the Claude GitHub App installation page on GitHub, where you have two options:
6684
6785* **Grant access yourself**: allow Claude access to all of your repositories or only to specific ones
68* **Request access**: your GitHub organization's administrators receive an email notification. Once they approve, you can sync and add the repository
86* **Request access**: for a repository owned by a GitHub organization you don't administer, ask for access. The organization's administrators receive an email notification from GitHub.
6987
88After access is granted, pick the repository again.
89
7090## Try the connector
7191
72After you add repository content, ask Claude something that depends on the code you selected. For example, ask Claude:
92After you add repository content, ask Claude something that depends on the code you added. For example, ask Claude:
7393
74* Explain how request authentication works in these files
94* Explain how request authentication works in this repository
7595* Where is the retry logic, and what happens when it gives up?
7696
77Claude answers from the names and contents of the files you selected on the branch you chose. It doesn't see commit history, pull requests, issues, or repository metadata; [Review what Claude retrieves from GitHub](#review-what-claude-retrieves-from-github) has the full list.
97Claude doesn't see commit history, pull requests, issues, or repository metadata. [Review what Claude retrieves from GitHub](#review-what-claude-retrieves-from-github) has the full list.
7898
7999## Keep repository content current
80100
81After you add a repository, use these controls in your project knowledge to keep its content current and scoped to what you need:
101After you add a repository to a project, use these controls in your project knowledge to keep its content current:
82102
83103* **Sync**: select **Sync now** on the repository in your project knowledge to fetch the latest changes, especially before a new analysis or after major changes to the repository
84* **Change the selection**: select **Configure files** to change which files and folders Claude reads
85104* **Multiple repositories**: you can add several repositories for broader context, as long as the selected content fits within Claude's context window
86105* **Lost access**: if you lose access to a repository, you can no longer view its contents in projects where it was added. The repository preview is removed, but your conversation history remains
87106
107### Change which files Claude reads in a project
108
109You can change which files and folders Claude reads from a repository you already added to a project.
110
1111. Open the project.
1122. In your project knowledge, select the repository.
1133. Select the files and folders you want Claude to read.
1144. Select **Update**.
115
88116## Review what Claude retrieves from GitHub
89117
90118The table lists what the integration reads from a repository and what it leaves out.
from line 126
98126
99127## Best practices
100128
101These habits help Claude give useful answers about a codebase:
129These habits help when you add repository content to a project:
102130
103131* **Start small**: begin with a small subset of the codebase to see how Claude interprets your code
104132* **Select files thoughtfully**: include the files central to your task while staying within token limits
from line 133
105133* **Iterate and refine**: ask follow-up questions when an initial response needs clarification
106134* **Combine with human expertise**: treat Claude's analysis as a starting point for team discussion
107135* **Sync regularly**: refresh the GitHub sync periodically, especially before a new analysis or after major repository changes
136
137## Troubleshooting
138
139The GitHub integration is built into Claude and managed from [**Customize > Connectors**](https://claude.ai/customize/connectors), where it's listed as **GitHub Integration** under **Your connectors** whether or not you've connected it.
140
141### Add from GitHub doesn't appear in a chat
142
143The **+** menu in a chat shows **Add from GitHub** only after your GitHub account is connected to Claude. Go to [**Customize > Connectors**](https://claude.ai/customize/connectors), select **GitHub Integration** under **Your connectors**, and select the **Connect** button. Then open the **+** menu in the chat again.
144
145On Team and Enterprise plans, **GitHub Integration** appears in **Customize > Connectors** only while GitHub is turned on for your organization. If it isn't listed there, ask someone who manages your organization's settings to turn it on in [**Organization settings > Connectors**](https://claude.ai/admin-settings/connectors).
146
147### Claude cannot access that resource
148
149Claude couldn't reach the repository you picked or pasted. If the repository exists, it's most likely private and Claude doesn't have access to it yet. Follow [Grant Claude access to a private repository](#grant-claude-access-to-a-private-repository), then pick the repository again.
108150
109151## Next steps
110152
No line in this hunk matches that.