Github如何添加合适的开源License(Apache License 2.0、MIT License、GPL3) 您所在的位置:网站首页 github开源许可证 Github如何添加合适的开源License(Apache License 2.0、MIT License、GPL3)

Github如何添加合适的开源License(Apache License 2.0、MIT License、GPL3)

2023-08-21 06:21| 来源: 网络整理| 查看: 265

本文为作者学习开源许可的笔记 欢迎交流讨论,喜欢的话点个赞吧

欢迎去看我的主页: NicholasYe’s Hompage.

1.如何添加一个开源License 在github自己的项目界面中点击Add file中的Create new file

在这里插入图片描述

再将自己的新文件命名为LICENSE,此时右侧会会出现一个Choose a license template选项

在这里插入图片描述

点击该选项就会有看到一列表的开源License

在这里插入图片描述

2.如何选择一个合适的开源License 1.Apache License 2.0

该License的特点:

任何情况下使用必须要带上License可以对源代码进行修改,但需要在被修改的文件中说明该协议下的代码可以进行商用

使用说明:

在您的工作中包含一份 Apache 许可证的副本,通常在名为 LICENSE 的文件中,并考虑还包括一个引用该许可证的 NOTICE 文件。要将 Apache 许可应用于您工作中的特定文件,请附上以下样板声明,用您自己的识别信息替换括号“[]”中的字段。(不要包括括号!)用文件格式的适当注释语法将文本括起来。

APPENDIX: How to apply the Apache License to your work.

To apply the Apache License to your work, attach the following boilerplate notice, with the fields enclosed by brackets “[]” replaced with your own identifying information. (Don’t include the brackets!) The text should be enclosed in the appropriate comment syntax for the file format. We also recommend that a file or class name and description of purpose be included on the same “printed page” as the copyright notice for easier identification within third-party archives.

Copyright [yyyy] [name of copyright owner] Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. 样例(AliceMind): License AliceMind is released under the Apache 2.0 license. Copyright 1999-2020 Alibaba Group Holding Ltd. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at the following link. http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. 2. MIT License

该License的特点

可以对源代码进行修改,也不需要对自己的修改进行说明修改后的代码可以闭源进行商用,但必须附有MIT授权协议和版权声明

使用说明:直接添加在项目里就行了

MIT License Copyright (c) 2021 NicholasYe Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 3. GNU General Public License v3.0

该License的特点:

在修改源码后,不可以闭源用于产品的发布和销售对于该协议的产品,其衍生的软件产品也必须采用GPL协议

使用说明:

将下列文字附加到每个源文件的开头,以最有效地说明开源所有条件每个文件至少应该添加“版权”行和关于完整“版权告示”在文件中的位置还要添加有关如何通过电子邮件和纸质邮件与您联系的信息

If you develop a new program, and you want it to be of the greatest possible use to the public, the best way to achieve this is to make it free software which everyone can redistribute and change under these terms.

To do so, attach the following notices to the program. It is safest to attach them to the start of each source file to most effectively state the exclusion of warranty; and each file should have at least the “copyright” line and a pointer to where the full notice is found.

Also add information on how to contact you by electronic and paper mail.



【本文地址】

公司简介

联系我们

今日新闻

    推荐新闻

    专题文章
      CopyRight 2018-2019 实验室设备网 版权所有