How to Use the ChatGPT GitHub Connector

The ChatGPT GitHub connector lets you ask questions grounded in a connected repository. Here is how to connect, what to ask, where the access boundaries are, and how to keep project decisions outside the chat.

Updated 5 min read

The ChatGPT GitHub connector lets ChatGPT read from a connected GitHub repository and answer questions grounded in that code or content. You connect a permitted repository, ask ChatGPT questions about it, and the answers cite the source files rather than relying on general training knowledge. It is useful for exploring a codebase, reviewing pull request context, or asking about documentation.

Knowing the access boundaries matters before you start. Tools like fenbs keep the project decisions, open tasks, and next steps outside the chat, so a new session with ChatGPT or any other AI app starts from the same ground.

What the GitHub connector lets ChatGPT do

The connector lets ChatGPT read repository content you have authorized: code files, README files, documentation, and commit history, depending on what the connector can access. You can ask about a specific file, a function, a pattern across the codebase, or the contents of a pull request.

The connector does not give ChatGPT write access to the repository. It cannot commit code, open pull requests, close issues, or change settings. Every change to the repository still goes through your normal workflow.

For a comparison of ChatGPT and GitHub Copilot as coding tools, see GitHub Copilot vs. ChatGPT. For connectors to other project tools, see ChatGPT connectors and apps.

Connect a repository

The connector is available on ChatGPT plans that include connectors. OpenAI's own help pages describe which plans have connector access; check there rather than relying on third-party summaries, because plan availability changes. To connect a repository, go to ChatGPT settings and find the connector or integration section. You authorize GitHub access and select which repositories the connector can read.

Grant access only to the repositories this task needs. Over-broad access is harder to audit later and increases the amount of irrelevant context ChatGPT has to search. Start with one repository, confirm it works, and expand from there.

If you are connecting a work or organization repository, check whether your organization's GitHub settings permit third-party OAuth access. An organization administrator may need to approve the connection. Attempting to connect without that approval will fail silently or with an access error.

Ask source-grounded questions

Once connected, tell ChatGPT the repository name in your prompt. The most useful questions are specific: name the file, function or feature you are asking about rather than asking a broad question about the whole codebase. A specific question produces a specific answer with citations; a broad question produces a summary that is harder to verify.

  • Ask about a file: "In the repository, what does the processPayment function in src/billing.ts do?"
  • Ask about a pattern: "Where is the error-handling pattern for API calls used in this repository?"
  • Ask about documentation: "Does the README explain how to run the integration tests?"
  • Ask about a pull request: "What changes does PR #47 make to the authentication flow?"

Check the citations in ChatGPT's answers against the actual files. The connector reads the repository, but ChatGPT can still misread a function's behavior or miss a branch of logic. Treat the answers as a starting point for your own review, not as a replacement for reading the code.

How fenbs helps

Keep project decisions and next steps outside the repository

The connector lets ChatGPT read your code, but project decisions, open questions and next steps need a separate home. Save them in fenbs as tasks and notes. The next session — with ChatGPT or another AI app — reads the project context and starts from the current state rather than the last commit message.

Create a free account

Free for one person · No credit card · Works with Claude, ChatGPT, Cursor and more

Understand the access boundaries

The connector reads only what you have authorized. Private repositories you did not select are not accessible. Organization repositories may have additional restrictions. If ChatGPT tells you it cannot find a file you know exists, confirm which repositories are connected and whether the file is in one of them.

The connector does not give ChatGPT access to your GitHub secrets, Actions environment variables, or anything stored in GitHub settings rather than the repository itself. Code that calls a secret by name is visible; the secret value is not.

If the connector stops working, check ChatGPT connectors not working for common causes. Re-authorization is usually required when a GitHub token expires or when repository access permissions change.

Keep project decisions beyond the repository

Source code records what was built. It does not record why a pattern was chosen, which approach was rejected, or what the next step is. Those decisions belong in a project record. When you make an architectural choice after exploring the codebase with ChatGPT, write it down as a decision with its reason. The next session will read the code and the decision together.

Links to relevant issues, pull requests, and documentation pages are also worth saving with the project. A connector that can read the repository is more useful when the session starts from a list of the specific files and pull requests that are in scope.

How to do this with fenbs

  1. Create a free account. Add a project for the codebase work with a description of what you are building or reviewing.
  2. Add tasks for the specific questions or changes in scope. Link the relevant pull requests or issues in the task notes.
  3. Connect ChatGPT over MCP from Integrations. Ask it to read the project context, including the relevant repository links, before each session.
  4. Record architectural decisions in Decisions and rules after exploring the codebase. Include the reason and any alternatives you rejected.
  5. Before the session ends, ask ChatGPT to save progress: files reviewed, decisions made, and the next step.

Questions people ask.

What can the ChatGPT GitHub connector read?

It can read the content of repositories you authorize: code files, documentation, README files and pull request content, depending on what the connector exposes. It does not read GitHub secrets, Actions variables, or repositories you did not select during setup.

Does the connector give ChatGPT write access to GitHub?

No. The connector is read-only. ChatGPT cannot commit code, open or close pull requests, create issues, or change repository settings through the connector.

Which ChatGPT plan includes the GitHub connector?

Connector availability depends on your ChatGPT plan. Check OpenAI's own help pages or your ChatGPT settings for current availability. Plan features change, and third-party summaries may be out of date.

Can I connect a private organization repository?

Yes, if your GitHub organization permits third-party OAuth access and you have permission to authorize it. An organization administrator may need to approve the connection first. If the connection fails on a private repository, check your organization's GitHub settings.

What is the difference between the GitHub connector and GitHub Copilot?

The ChatGPT GitHub connector lets you ask ChatGPT questions about a repository's content. GitHub Copilot is a separate product that assists with writing code inside your editor. They serve different purposes and are not interchangeable.

More in Connect your AI tools

All Connect your AI tools articles

Start with one thing.

Free for one person · No credit card · Works with Claude, ChatGPT, Cursor and more

There is nothing to set up first. Write one line and you’ve started.