Skip to content
Source
Sign inSign up

See the license

Code and repositories / Read code

See the license of a repository

You want to know if you can use the code of a repository, and what the license asks of you. The home page of the repository shows the license and its terms in the right sidebar.

2 min read

1. Open the home page

Open the repository. In the right sidebar, under About, find the License section.

The License section in the sidebar of a repository: MIT License, a summary, the Permits, Requires and Forbids lists, the Read the license link, and the note This is not legal advice

2. Read the terms

The License section shows:

  • The name of the license, and one sentence about it.
  • Up to three lists of terms (see the table below).
  • Read the license: a link to the license file.
  • The note "This is not legal advice."
ListWhat it tells you
PermitsWhat you can do, for example commercial use and modification.
RequiresWhat you must do, for example keep the license and copyright notice.
ForbidsWhat the license does not give you, for example liability and warranty.
  • If the text is not a known license, the section shows Other license and the link only.
  • If the repository has no license file, the sidebar has no License section.

Done

You know what the license lets you do, what it asks of you, and where to read its full text.

Get your license recognized

The known licenses are the choosealicense.com licenses that GitHub also uses. To show the terms of your license on the home page of your repository:

  1. Put the license file at the root of the repository.
  2. Give it one of these names: LICENSE, LICENCE, COPYING, or UNLICENSE. Uppercase and lowercase are the same.
  3. Use no extension, or .md, or .txt. For example, LICENSE.md is correct.
  4. Keep the license text unchanged. Do not add a heading or other text above it.

The year and the name of the copyright holder can be any text. The License section then shows the name and the terms of your license.

To start a new repository with a license, see Start a repository with a .gitignore and a license.