Amazon has the rights to publish a book, and you have the right to receive a copy of the book, but neither of those gives you the right to re-publish the book under your own name.
You don't get to go after GitHub because you have no contractual relationship with them. At best, you can get an injunction forcing them to take it down, though getting them to un-train copilot may not be feasible. At best you'd get a small cash offer, since you're unlikely to be able to justify any damages in a suit.
... the copyright owner may elect, at any time before final judgment is rendered, to recover, instead of actual damages and profits, an award of statutory damages for all infringements ... in a sum of not less than $750 or more than $30,000. ... in a case where the copyright owner sustains the burden of proving, and the court finds, that infringement was committed willfully, the court in its discretion may increase the award of statutory damages to a sum of not more than $150,000.
<https://www.law.cornell.edu/uscode/text/17/504>
The issue isn't contract. It's copyright infringement.
I'm curious if Github's ToS make uploading GPL software you don't own a copyright violation.
> You don't get to go after GitHub because you have no contractual relationship with them
What makes you say that? If someone eg uploads my copyrighted work to YouTube, I file a DMCA notice with YouTube to stop distributing my work. If YT ignores the notice then I can pursue them with a lawsuit.
How is this situation different?