How to license GitHub repositories and issues to AI companies
By Plety. Updated
To license GitHub repositories and issues to AI companies, an organisation exports its private repositories with their issues and pull requests, removes secrets, personal data and code it does not own, and grants a written licence. GitHub's Terms of Service, effective 27 April 2026, say users own their content, but also let GitHub and its affiliates train AI on it, so public and private material are treated differently.
Can a company license its GitHub repositories and issues to AI companies?
Yes, for content it owns, but what GitHub and others may already do with it depends on whether a repository is public or private. Section D.3 of the GitHub Terms of Service, effective 27 April 2026, says you own Your Content. Section D.4 grants GitHub and its affiliates the right to store, parse and copy that content as necessary to provide, develop and improve the service, including by training AI features, and for training the AI and machine learning models of its affiliates. The terms name Microsoft as an affiliate.
Organisations on a GitHub Customer Agreement have a different contract. Its General Terms (version March 2025) define Customer Content as content the customer creates, owns or holds the rights to, treat it as confidential information, and say each party will use the other's confidential information only as part of the parties' business relationship. Which document governs the organisation is the first thing to check.
Does GitHub train AI on repository content?
Its terms allow it for public content, but for private repositories only where the content is given to an AI feature as input. Section E.2 says GitHub considers private repository contents confidential. Section E.3 says that if private repository content is provided as Input to AI Features, GitHub may use that Input to provide, develop, train and improve the service, subject to the opt-out in section J.3, and will not otherwise use private repository contents to develop or improve the service.
Section J.1 says the training terms in J.3 apply only to individual licences, and that a GitHub Customer Agreement or volume licensing agreement governs data use instead. GitHub's blog said on 25 March 2026 that from 24 April interaction data from Copilot Free, Pro and Pro+ users, such as inputs, outputs, code snippets and associated context, would be used to train its AI models unless users opted out, that Copilot Business and Enterprise users were not affected, and that content from issues, discussions or private repositories at rest is not used. A seller records which plan each developer used.
What do public and private repositories mean for a licence?
Public material is already open to everyone and licensed to GitHub, so it can be licensed only on a non-exclusive basis, while private repositories hold material that is not otherwise available. Section D.8 says that by contributing to a public repository a user directs GitHub to make the content accessible to everyone on the internet. Section D.6 says content added to a repository with a licence notice is licensed under the same terms, which GitHub calls inbound=outbound.
| Content | What GitHub's terms say | Usual position |
|---|---|---|
| Private repositories | Confidential to the owner (E.2); used for GitHub's AI only when given to an AI feature as input (E.3) | Possible after secrets, personal data and third-party code are removed |
| Public repositories | Viewable and forkable by others (D.5, D.8); licensed to GitHub, including for AI training (D.4) | Non-exclusive at most |
| Issues and comments by outside users | Each user owns their content (D.3); contributions under a repository licence follow it (D.6) | Left out unless the company holds the rights |
| Copilot interaction data | Used for training on Free, Pro and Pro+ unless opted out; Business and Enterprise not affected (GitHub blog, March 2026) | Checked before any exclusivity is promised |
| Client repositories in the organisation | Owned as the client contract says | Left out unless the contract allows |
Why would AI developers want repositories with their issues and pull requests?
Because the history of how software changed can teach models to reason about fixes, not only to write code. SWE-RL (Wei and others, February 2025) applied reinforcement learning to open-source software evolution data, which its authors describe as the record of a software's entire lifecycle, including code snapshots, code changes and events such as issues and pull requests. The resulting Llama3-SWE-RL-70B solved 41.0% of SWE-bench Verified, a human-verified collection of real-world GitHub issues.
Open-source history is public; a company's private history is not. Review and issue records in general are covered at https://plety.net/about/records/code-review-and-issue-history, and source code at https://plety.net/about/records/source-code.
How are repositories and issues exported from a GitHub organisation?
With GitHub's migration archive, which carries the repositories together with their issues, pull requests and reviews, as of November 2026. GitHub's guide to exporting migration data says the person running it needs owner permissions on the organisation's repositories and an access token with the repo and admin:org scopes. It recommends locking repositories during the export, says the final archive must be less than 20 GB, that file attachments can be excluded, and that the archive is deleted automatically after seven days.
GitHub's list of migrated data includes issues and their comments, pull requests, reviews and review comments, commit comments, releases, wikis, webhooks and repository deploy keys. File-level comments are not migrated, and items not on the list, including Git LFS assets, cannot be migrated, so large files are fetched separately.
Do not delete the organisation first. GitHub says deleting an organisation permanently removes all repositories, forks of private repositories, wikis, issues and pull requests, that it cannot restore the content, and that downgrading to GitHub Free or archiving are the alternatives. Section M.2 of the terms says repository content is deleted within 90 days of cancellation, barring legal requirements, and section 9.5 of the Customer Agreement allows migration for up to 90 days after termination.
What must be removed before GitHub data is licensed?
Secrets, personal data and anything the company does not own. GitHub's secret scanning page says scanning covers the entire Git history on all branches, plus issues, pull requests, discussions, wikis and secret gists; it runs free on public repositories, but organisation-owned private repositories need GitHub Secret Protection on GitHub Team or Enterprise Cloud. Webhook settings and deploy keys in a migration archive describe the company's systems and are stripped before anything leaves.
Usernames, real names, commit email addresses and @mentions identify developers and are replaced inside the company's own systems. Open-source code keeps its own licence terms, client code follows the client contract, and where the company acted as a processor, Article 28(3)(a) of the UK GDPR limits it to the client's documented instructions. Plety never holds, views or passes on records, samples, logins or money.
Questions
- Does GitHub's AI training opt-out cover repositories?
- No. Section J.3 says the opt-out applies only to Inputs and Outputs of AI features, not to the licence in sections D.4 to D.8 or to content stored in public repositories.
- What is GitHub's access reciprocity clause?
- Section D.9 says anyone who uses automated means to collect public GitHub content to develop or train a commercially available AI system waives terms that would stop GitHub doing the same with their own public content. It does not apply to academic research or to services with fewer than 700 million monthly active users.
- Can GitHub provide a copy after the account is closed?
- Section M.2 says GitHub will make a reasonable effort to provide an account owner with a copy of lawful, non-infringing account contents if asked within 90 days of cancellation, termination or downgrade.
Want to know what your records could fetch?
Email Herman or book a 30-minute call. We tell you which buyers fit before anything else happens.
Sources
- GitHub Terms of Service, sections D, E, J and M (effective 27 April 2026)
- GitHub Customer Agreement, General Terms, sections 4 and 9.5 (version March 2025; listed on the customer terms page)
- GitHub Blog, Updates to GitHub Copilot interaction data usage policy (25 March 2026)
- GitHub Docs, Exporting migration data from GitHub.com (read November 2026)
- GitHub Docs, About ghe-migrator: migrated data (read November 2026)
- GitHub Docs, Secret scanning (read November 2026)
- GitHub Docs, Deleting an organization account (read November 2026)
- Wei and others, SWE-RL (arXiv, February 2025)
This page is general information, not legal advice. Take advice on your own company's records and contracts.