Yes, but it depends on which OpenAI feature or tool you're referring to.
If you mean ChatGPT's GitHub integration, then yes—it can work with private GitHub repositories after you explicitly connect your GitHub account and authorize access. You control which repositories are accessible, and the integration only has access to the repositories you've granted permission to.
If you're referring to the OpenAI API, there isn't a built-in GitHub integration. Instead, you would typically:
- Clone or access your private repository yourself (for example, in your own application or CI pipeline).
- Send the relevant code or files to the API as part of your prompts.
- Control exactly what data is shared with the API.
If you're asking about a different tool (for example, Codex, the Responses API, or another OpenAI product), let me know which one you're using, and I can explain exactly how private repository access works in that context.