git 我的公共 github 项目可以不开源吗?

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/16933385/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me): StackOverFlow

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-09-10 16:19:44  来源:igfitidea点击:

Can my public github project not be open source?

gitgithubopen-source

提问by flybywire

I have a new project in github. It is public. However I don't remember being asked what license to give it.

我在 github 上有一个新项目。它是公开的。但是我不记得有人问我要授予它什么许可证。

In google code / sourceforge before starting a new repository I recall being asked to commit to an open source license.

在开始新存储库之前,在 google code/sourceforge 中,我记得被要求提交开源许可证。

Of course there is a difference between public and open source. Can I say, for example, you are free to download, read, and study the code but you have to pay $$$ for running it? Or you cannot fork it? Or whatever non-open-source-compatible-clause-here?

当然,公共和开源之间是有区别的。我可以说,例如,您可以免费下载、阅读和学习代码,但运行它必须支付 $$$ 费用吗?或者你不能分叉?或者这里有什么非开源兼容条款?

回答by nulltoken

I have a new project in github. It is public. However I don't remember being asked what license to give it.

我在 github 上有一个新项目。它是公开的。但是我不记得有人问我要授予它什么许可证。

Code hosted at GitHub without any explicit licence mostly falls under the "All rights reserved" clause (cf. InfoWorld post on this subject). Below a relevant excerpt of the item:

在没有任何明确许可的情况下托管在 GitHub 上的代码大多属于“保留所有权利”条款(参见关于此主题的 InfoWorld 帖子)。下面是该项目的相关摘录:

"What are the terms under which the code in all those GitHub projects is made available? A precise answer depends on your jurisdiction and would require a lawyer's advice, but it's likely that the answer for most people is "all rights reserved" -- in other words, you have no rights to use the code. GitHub does not include any useful default licensing terms in its terms of service; the most likely scenario is that any use of the copyrighted material in one of those no-license projects is formally a breach of copyright. Under copyright law, code without a license cannot be legally shared, as the default for copyrighted materials is that all rights are reserved."

“所有这些 GitHub 项目中的代码可用的条款是什么?准确的答案取决于您的司法管辖区,需要律师的建议,但对于大多数人来说,答案很可能是“保留所有权利”——在换句话说,您无权使用该代码。GitHub 在其服务条款中不包含任何有用的默认许可条款;最可能的情况是,在这些无许可项目之一中使用受版权保护的材料是正式的违反版权。根据版权法,没有许可证的代码不能合法共享,因为受版权保护的材料的默认设置是保留所有权利。”

However, in order to clearly state your intent, maybe would it be better to clearly add a licence in your repo (as a separate text file (eg. COPYING.txt) and as part of the README.txtfile.

但是,为了清楚地说明您的意图,也许最好在您的存储库中明确添加许可证(作为单独的文本文件(例如COPYING.txt)和README.txt文件的一部分。

Of course there is a difference between public and open source. Can I say, for example, you are free to download, read, and study the code but you have to pay $$$ for running it?

当然,公共和开源之间是有区别的。我可以说,例如,您可以免费下载、阅读和学习代码,但运行它必须支付 $$$ 费用吗?

You could get some inspiration from the RavenDbproject dual licencingmode which limits the usage as follows:

您可以从RavenDb项目双许可模式中获得一些启发,该模式限制使用如下:

  • Commercial editions can be used in closed source environment and are available under a subscription or perpetual pricing model. Prices are per instance. As long as the subscription is valid, new releases are included in it automatically.
  • You can use Raven for free, if your project is Open Source.
  • 商业版本可在封闭源环境中使用,并以订阅或永久定价模式提供。价格是每个实例。只要订阅有效,新版本就会自动包含在其中。
  • 如果您的项目是开源的,您可以免费使用 Raven。

Provided you accept Pull Requests, it may be a good idea to make sure contributors abide to the licencing mode and make them explicitly accept the Intellectual Property related terms and the transfer of the ownership of the copyright. As an example, you can refer to the RavenDb contributing guide.

如果您接受 Pull Requests,最好确保贡献者遵守许可模式,并让他们明确接受知识产权相关条款和版权所有权的转移。例如,您可以参考 RavenDb贡献指南

回答by Thomas Kaliakos

I would suggest moving your project to bitbucket(that also supports git and mercurial).
There you can have private repositories for free. Having the code of your commercial project right out in the public, is not a good practice, even if you have the proper licences. Just my two pennies.

我建议将您的项目移至bitbucket(也支持 git 和 mercurial)。
在那里您可以免费拥有私有存储库。将您的商业项目的代码公之于众并不是一个好习惯,即使您拥有适当的许可证。只有我的两便士。

回答by hakre

I have a new project in github. It is public. However I don't remember being asked what license to give it.

我在 github 上有一个新项目。它是公开的。但是我不记得有人问我要授予它什么许可证。

Well, you remember well, Github does not ask you that.

好吧,你记得很清楚,Github 不会问你这个。

In google code / sourceforge before starting a new repository I recall being asked to commit to an open source license.

在开始新存储库之前,在 google code/sourceforge 中,我记得被要求提交开源许可证。

Yes, they require that for documentation. However, those are not the same as Github.

是的,他们需要文件。但是,这些与 Github 不同。

Of course there is a difference between public and open source. Can I say, for example, you are free to download, read, and study the code but you have to pay $$$ for running it? Or you cannot fork it? Or whatever non-open-source-compatible-clause-here?

当然,公共和开源之间是有区别的。我可以说,例如,您可以免费下载、阅读和学习代码,但运行它必须支付 $$$ 费用吗?或者你不能分叉?或者这里有什么非开源兼容条款?

From what I know, Github only requires you (for the public and 0$ repositories) to have it "open source" (with no further definition of the meaning of those two words) being able to "fork" (with no further definition which rights are passed with the fork). If you write Github support an Email, they will just tell you something like that with all the details.

据我所知,Github 只要求你(对于公共和 0$ 存储库)让它“开源”(没有进一步定义这两个词的含义)能够“分叉”(没有进一步定义哪个权利通过分叉传递)。如果你给 Github support 写一封电子邮件,他们只会告诉你类似的东西和所有细节。

As long as you are the author and you take care to fullfill those very loose terms of Github itself, you are free to do whatever you want and you can define rules under which your software can be used. For example you can say it's open source in the meaning that the source is open and can be read and that the code can be forked but when forked not rights at all are passed with the forked copy (which means that those who have forked a copy have not licensed any rights with their fork - basically can not use it) but you can not disallow forking. E.g. last time I asked them, all they wrote to me was "then you should better make this visible" however there is no requirement.

只要您是作者,并且注意填写 Github 本身那些非常松散的条款,您就可以自由地做任何想做的事情,并且可以定义可以使用您的软件的规则。例如,你可以说它是开源的,意思是源是开放的,可以阅读,代码可以分叉,但是分叉​​时根本没有权利通过分叉副本传递(这意味着那些已经分叉副本的人没有使用他们的分叉获得任何权利 - 基本上不能使用它)但你不能禁止分叉。例如,上次我问他们时,他们写给我的只是“那你最好让这件事可见”,但没有要求。

Keep in mind that many others won't share this same view of yours, so better talk about this with a lawyer on your behalf so just for the cases where a different opinions, you know for the matter of the law what is just for you and what not.

请记住,许多其他人不会与您持相同的观点,因此最好代表您与律师讨论这个问题,以便仅针对不同意见的情况,您就法律而言知道什么是适合您的什么不是。

See as well:

另见:

回答by MJCO

It's worth bearing in mind, from a person with a legal background and I'm aware this is an old question that I'm chirping in on - but in many jurisdictions to have valid 'copyright' for example, you have to enforce your copyright - almost impossible to do when you have your source public.

值得牢记的是,来自具有法律背景的人,我知道这是一个老问题,我正在喋喋不休 - 但在许多司法管辖区,例如,拥有有效的“版权”,您必须强制执行您的版权- 当您将源公开时,几乎不可能做到。

It may or may not be relevant but it is nonetheless a valid point to consider when looking at GitHub for hosting code which does not carry an open source license.

它可能相关也可能不相关,但在查看 GitHub 以托管不带有开源许可证的代码时,它仍然是一个有效的考虑点。