Can I use the code in a GitHub project which does not have a license specified?
Say that a public GitHub project does not have a license specified. Can I use that code in my own code? If I can, under what licenses can I distribute my code? Can I use any open source license?
- Am I allowed to use GitLab Community Edition for commercial projects?
- What's the default license of code published at GitHub?
- 'Correct' way to use git project
- Can I work on github with opened source code on commercial project and how?
- How to change the license for a project at Github?
- How can I synchronize closed and open sourced versions of the same tool using Mercurial?
3 Solutions collect form web for “Can I use the code in a GitHub project which does not have a license specified?”
Say that a public Github project does not have a license specified. Can I use that code in my own code?
You can not say as you don’t know the licensing terms. You first need to ask the owner of the project what’s allowed or not.
The meaning of a public Github repository is specified by Github as the following:
Public Repositories can be viewed and cloned by anyone. Choose this if your repository:
- is an open source project
- should be easy for other members to fork and contribute back their modifications
The meaning of “open source project” is not really saying much more that you can read the source code publicly. Which is then a pre-condition to fork a repository so the second point is pretty redundant and not adding anything in clarification of usage rights. It says even “should” which is saying nothing concrete.
If I can, under what licenses can I distribute my code?
If you can, then the original author(s) would have told you that.
Can I use any open source license?
It depends on the legal status you want to achieve ^^. Generally I can not suggest you to do that at all.
You should really find out first which license applies. That can be done by contacting the original author. Next to that you can ask the original author to make the license more prominent to make re-use of the code easier for others.
This will help you as well if others are questioning the use rights of your derivate later on.
Say that a public github project does not have a license specified. Can I use that code in my own code?
- No, if software is published without a license granting you rights to distribute that software, then in most countries you have no rights to distribute that software.
Just because it is available for download doesn’t mean that it is in the public domain. In fact it is protected by the WIPO Copyright Treaty and thus the Berne Convention even if it is downloadable and even if it doesn’t include a copyright notice – copyright is attached automatically on creation.
Can I use any open source license?
- No, any license you try to attach to that code would be void. Since you do not own copyright on the material, you cannot assign rights over that code to others.
When in doubt, ask the author to specify his license.
For very open licenses (e.g. BSD, MIT, …), you can do whatever you want as long as the license is intact in the source (+ not using the author names as endorsement, …).
For copy-left licenses (e.g. GPL), your license has to be GPL-compatible, which probably means GPL as well.
For commercial licenses (probably not the case if the Github project is public), have someone (typically a license lawyer) read through the license with you to understand what is your liability for using this piece of code.
Now for your case, if you are developing a hobby project which you are not planning on making money out of in the near future, go with the BSD license and use that Github project. And please put a license file in your source tree.