9

I have been working on a project that is hosted on GitHub in a private repository. The repo has three directories, call them frame, private1, private2. The frame directory is framework code used by private1 and private2, which both contain image assets and html content that make use of the code in frame. Currently, after a build process, private1 and private2 are deployed as publicly viewable websites.

I would like to change this GitHub repo from private to public, making frame (and some other files) reusable under MIT license, but retaining copyright protection on private1 and private2.

I read this related question:

How can I use an MIT license for code but protect the copyright of photos in my repository?

So, if I create a LICENSE file in the root directory of the repo with the following content, would this be a correct solution:

This code repository contains some open source and some copyrighted content.
All of the content under the directories named private1 and private2 
has been made available to this project by XYZ Corp and is copyrighted;
permission to use those files is not granted. All other parts of this 
repository are made available under the standard MIT License:

Copyright (c) 2017 XYZ Corp

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.
13

There's no legal problem doing that, but it is confusing, and it's almost inevitable that some people will think the MIT license will apply to the whole repository.

This is a situation where a git submodule would make sense - split out the MIT licensed code into its own repository, and link to it with a submodule. Your local folder structure won't have to change, and the main repository could even remain private.

  • I could not agree more. Simple and explicit is better than trying to cram it all in a single place that will be confusing as hell for users – Philippe Ombredanne Feb 15 '17 at 15:25
  • I've thought about using a git submodule. However: 1) how do I break out the git history? 2) are submodules complicated? I'm not the only person working on this. – Purplejacket Feb 15 '17 at 17:43
  • @Purplejacket You could extract the folder and its history with the filter-branch command. That is not the simplest action, but once you're done submodules are not complicated. – curiousdannii Feb 15 '17 at 23:12
  • 3
    Please break out the content. Github prominently features most licenses with an icon right on the front page of a repo, and they're normally covering all the code in a repo - many people won't understand the multiple-license text you have (or rather, they won't often think to read it). – Shane Curcuru Feb 17 '17 at 17:55

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.