Disclaimer: I am not a lawyer, and this is not legal advice. Please contact an attorney with any questions regarding your specific situation or concerns.

Many times, I come across an interesting repo on GitHub via the trending page, or via the Hacker News front page, or by following some links elsewhere. However, when I get to the repo, I realize it has no license attached to it. What to do?

What’s the problem?

Unfortunately, just because it’s publicly posted on GitHub, does not mean it’s something I can use: at least in the US, default copyright rules apply when no other explicit copyright or licensing statement is given, which means it’s “all rights reserved”, which means it allows no permission to copy, modify, or redistribute, and thus, it’s off limits: it might as well be closed-source and proprietary.

If your repo is suffering from a lack of an explicit license, please fix it! This will make it possible for your users to use it, incorporate it into their projects, and even submit fixes and additional features to your project.

How to fix your own projects?

This is as easy as adding a LICENSE file to your repo with a license of your choice. Not sure what license you should use? Take a look at GitHub’s guide to choosing a license which will hopefully help you choose one that suits your use case and requirements, or consult your attorney with any questions or concerns.

Note: if your project is not code, or includes non-code materials in addition to code, see also the section What about work other than code? at the end of this post for further discussion and pointers.

Of course, you can also post a question on Open Source Stack Exchange, even about licensing, but please note that you shouldn’t take legal advice from blog posts or forums, and should contact an attorney instead. Your employer might also have some guidelines or requirements about open source licensing, so you might want to talk to your employer’s attorneys or open source programs office as well.

How to encourage others to fix their projects?

When I come across a repo which is missing a license, I might leave the following request as an issue:


First, thank you for sharing this project with us!

Could you please add an explicit LICENSE file to the repo so that it’s clear under what terms the content is provided, and under what terms user contributions are licensed?

Per GitHub docs on licensing:

[…] without a license, the default copyright laws apply, meaning that you retain all rights to your source code and no one may reproduce, distribute, or create derivative works from your work. If you’re creating an open source project, we strongly encourage you to include an open source license.

Thanks!


Let’s break down the steps here:

  1. thank the person for taking the time and effort to (a) make something interesting and (b) sharing it with the world

  2. clearly and politely explain what you’re looking for (we need a LICENSE file)

  3. explain the rationale: note that since I’m not a lawyer, I cite an authority on the matter, in this case, GitHub’s own documentation — in many cases, the issues will be left on GitHub repos, so hopefully, users will be open to guidance from the same service they’re already using

  4. thank them in advance for (hopefully) addressing this issue

Are you in the same situation where there are projects you would like to use, contribute to, or extend, but you’re prevented from doing so due to a lack of license? Help spread the word about ensuring all of your work (not just code!) has an explicit licensing statement!

Here’s the raw Markdown code I use for pasting into a GitHub issue:

Issue title:

Please add a license to this repo

Issue body:

First, thank you for sharing this project with us!

Could you please add an explicit `LICENSE` file to the repo so that it's clear
under what terms the content is provided, and under what terms user
contributions are licensed?

Per [GitHub docs on licensing][github-docs-licensing]:

> [...] without a license, the default copyright laws apply, meaning that you
> retain all rights to your source code and no one may reproduce, distribute,
> or create derivative works from your work. If you're creating an open source
> project, we strongly encourage you to include an open source license.

Thanks!

[github-docs-licensing]: https://help.github.com/articles/licensing-a-repository/#choosing-the-right-license

Please feel free to use it yourself and let me know how it goes! You can cc: me on GitHub issues if you wish: I’m @mbrukman on GitHub.

Does it work?

Yes, many times it does, though not always, of course. Folks typically thank me for reminding them and letting them know how to fix the issue and add a license to the repo, which makes it possible for reuse and redistribution.

Other times, the issue might stay unresponded for weeks or even months, at which point, I may assume that the project has been abandoned, or the user isn’t interested in others using their project or contributing to it, which is also fine.

Here is a sampling of cases where authors chose to respond to my request by adding a license to their repositories:

As you can see, authors choose a variety of licenses, and it’s great to see these projects now have proper, clear licenses, which makes the ecosystem better for everyone!

What about work other than code?

You may have assumed that all this time, we were just talking about code, where licenses such as Apache 2.0, BSD, MIT and others predominate. But what about projects which are not code? For example, many repositories nowadays are curated collections of links, such as the “Awesome Foo” repos, or howtos for getting started in machine learning, or another popular topic. Or you may have content such as music, or graphics, or vector drawings, or 3D modles. What license is appropriate for these assets?

Thankfully, this has been addressed with Creative Commons, a non-profit working on enabling folks to share their creative works and enable others to extend and build upon those works to encourage creativity and remixing.

This organization has come up with a suite of Creative Commons licenses that are suitable for non-code works, such as these. Take a look at the options available to you and choose the one that best matches how you would like your work to be used. As always, if you have any questions, contact an attorney.