I have a public repository on GitHub. Some of the code was copy-and-pasted into another repository without keeping Licence headers and without any other back-linking to the original repository.

How to deal with that? I can imagine it happens all the time (on GitHub). What is the "usual" way to react? How can one enforce correct "copy-and-pasting", that is, at least keeping license and author information in place?

The license of the project is Apache 2.


1 Answer 1


One clarifying point: there is usually a legal obligation to keep original copyright notices with original license headers and texts. There is not usually a legal obligation to "link back" -- this doesn't generalize to projects that aren't distributed online, and would impose ambiguous obligations if the project moved network locations, etc.

The first recourse is ask nicely. Perhaps a polite message that communicates why the license header and copyright notice are important:

Hello {Downstream Author},

I noticed that you're using code from my software project {Foo} in your project {Bar}. I'm really glad that you found it useful. I put it under the Apache License exactly because I wanted projects like yours to use it freely.

I did notice, though, that you left out a few important pieces that the license requires. These are important but fortunately they're really easy to fix:

  1. Each file that uses code from {Foo} should preserve the original license header -- this is important so that other people down the line also know they have the right to modify and/or redistribute my software, just like you did. Your project should also include a copy of the Apache 2 license with the full license terms in your project, in case recipients have legal questions about their rights. (http://www.apache.org/licenses/LICENSE-2.0.txt) If your own code is licensed differently from Apache 2, you can state exactly which functions are licensed which way in each file.

  2. Each file that uses my code should include my copyright notice, so the people know who the original author was. If a file includes work from both you and from me, it should have copyright notices for each of us.

You can see an example of what the header should look like at {https://myrepo/myproject/somefile.c}

If you want to take care of it, that would be great; otherwise, I can send you a pull request with the header fixes.

If the downstream author doesn't respond to this, then do send a pull request. If the author doesn't respond (or responds negatively) to your pull request, you can send a more firmly-worded message stressing the particular potential harm of not having license headers and copyright notices (namely, confusion for recipients and stripping you of credit for your contribution).

If that doesn't work, then you have a hard decision to make: you would be legally in the clear to submit a DMCA takedown notice, since the downstream author is in violation of your license grant and is committing copyright infringement. This is definitely going to hurt some feelings, and may make you look like the bad guy to some people. (Though if the downstream author is rebuffing your polite request for authorship credit, there may be some bad feelings there already.) Weigh this possibility against your desire to bring the project into compliance and do whatever you think is best.


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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