Hugging Face crawls as many GitHub repositories as it can with the help of the Software Heritage Archive so as to create their Stack v2 LLM for code. And of course without consent of rights holders.

Opt-out is possible.