This sounds unenforceable in the general case. How could github know whether someone pushes their own code or not? Is it a license violation to push someone's FOSS code to github because the author didn't sign up with GH?
> Is it a license violation to push someone's FOSS code to github because the author didn't sign up with GH?
It depends on the licence.
It's very much enforceable that companies who provide content publishing platforms will indemnify themselves against people publishing content to which they do not have an appropriate licence.