When you make a creative work (which includes software), the work is under exclusive copyright by default. Nobody else can use, copy, distribute, or modify your work without being at risk of take-downs, shake-downs, or litigation. Once the work has other contributors (each a copyright holder), “nobody” starts including you.

An open source license grants permission to use, copy, distribute, and modify -- all necessary for open collaboration. Every repository on GitHub should have a license associated with it so that you, users, and contributors are protected and know how they can and should use material in the repository. Even if your project isn't necessarily software - like documentation, fonts, media, or data - a license is needed to protect you, users, and contributors.

In order to keep the protections of a project's open source license, users need to make sure to comply with the license's conditions, which typically require keeping a copy of the license and any copyright notices, and sometimes also the sharing of any modifications under the same license.

Key Roles

To navigate this landscape it's helpful to understand how different roles relate to licenses.

UserA user is someone who uses or modifies the project directly or uses the code as a dependency within another project. As a user, it's important to know what a project's license is so that you don't accidentally violate its terms. If you're simply using software as a product directly, the license is probably less important to you. However, if you're distributing or modifying the software, or using the code as a dependency, it can suddenly become a much bigger deal. For example, if you're using the code from an open source project, and you'd like to use that project as a dependency, you might have to include documentation that you're using that dependency.

ContributorA contributor is someone who wants to contribute code back to the original repository. Typically, a contributor relies on the project's license for permission to modify the project, and licenses their contributions to the project under the same license -- which subsequent users and contributors also rely on. Some projects will require contributors to sign a separate contributor license agreement (CLA), possibly giving the project owner additional rights -- if you're contributing to such a project as an employee, you might need to ask permission from your company to sign the CLA.

MaintainerA maintainer may not necessarily own a project, but they have special privileges and community responsibility to make sure that the community works together well to maintain and improve the project. As a maintainer, not only should you know which license your project is covered by, but it's also important to understand the terms of that license well enough to help contributors and users understand it. You'll still probably have the same concerns as a contributor, because your contributions will be made under the project's license.

OwnerThe owner may be an individual, an organization, or a company that has decided on what the license should be. The owner on GitHub is the account which is linked to the repository. As an owner, you're likely responsible for choosing a license for your project.

If you aren't sure which license is the best choice, the best resource to help you choose is found at choosealicense.com. This will guide you through a few questions that you should consider as you think about how others work with your project.

Additional resources

If you'd like to read more about licenses, check out these additional resources.