MIT许可协议
简介
MIT许可协议(The MIT License),名称源自麻省理工学院(Massachusetts Institute of Technology, MIT),又称X11许可协议(X11 License)。
MIT许可协议,是一种简洁、灵活的宽松许可证,允许自由地使用、复制、修改、合并、发布、分发、再授权和销售软件及其副本的任何部分,仅要求保留版权和许可声明。因此,MIT协议被广泛应用于各种开源软件项目中。
权限
- 修改: 许可材料可以被修改。
- 分发: 许可材料可以分发。
- 商业用途: 许可的材料和衍生物可用于商业目的。
- 私人使用: 许可的材料可以私下使用和修改。
条件
- 许可和版权声明: 许可和版权声明的副本必须包含在许可材料中。
协议内容
MIT License
Copyright (c) [year] [fullname]
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.
如何使用
在项目源代码的根目录中创建一个许可协议文本文件(通常命名为 LICENSE 或 LICENSE.txt),并将许可协议内容复制到该文件中。然后,将其中的 [year] 和 [fullname] 分别替换为 当前年份 和版权所有者的 姓名 即可。