# Can I use code from GitHub in my product?

**Short answer:** An MIT repository: Yes. An Apache-2.0 repository: Yes. An AGPL-3.0 repository, modified and run as a service: Yes.

Public on GitHub does not mean licensed: the repository's LICENSE file decides, and a repository with no license grants no rights. Pass the repo URL as source_url and Rightshold reads its declared license.

## An MIT repository — Yes

License: [MIT License](https://opensource.org/license/mit) (`MIT`, curated)

- Every use you described is granted by MIT, and nothing you described is prohibited.

Duties: attribution, license_notice
## An Apache-2.0 repository — Yes

License: [Apache License 2.0](https://www.apache.org/licenses/LICENSE-2.0) (`Apache-2.0`, curated)

- Every use you described is granted by Apache 2.0, and nothing you described is prohibited.

Duties: attribution, license_notice, state_changes
## An AGPL-3.0 repository, modified and run as a service — Yes

License: [GNU Affero General Public License v3.0](https://www.gnu.org/licenses/agpl-3.0.html) (`AGPL-3.0-only`, curated)

- Every use you described is granted by AGPL 3.0, and nothing you described is prohibited.

Duties: attribution, license_notice, state_changes, share_alike, source_disclosure, network_source_offer

## Context
- GitHub's terms let other users view and fork public repositories on GitHub; that is not a license to reuse the code elsewhere.

## Sources
- [GitHub: Licensing a repository](https://docs.github.com/en/repositories/managing-your-repositorys-settings-and-features/customizing-your-repository/licensing-a-repository)

## Check it yourself (free, no key)
```json
{
  "tool": "check_license",
  "arguments": {
    "license": "MIT",
    "intended_use": {
      "commercial_use": true,
      "modification": true,
      "redistribution": true
    }
  }
}
```
REST: POST https://www.rightshold.com/v1/licenses/check

_Computed from Rightshold's license profiles; not legal advice. Updated 2026-10-19. JSON: https://www.rightshold.com/answers/can-i-use-code-from-github-in-my-product.json_