Response from Martin Woodward, GitHub’s VP of Developer Relations:
Sorry for the inconvenience @koepnick - while searching across all repos has required being logged in for a long time, when we enhanced the search capabilities earlier in the 2023 we had to extend this to repos as well (see https://github.blog/changelog/2023-06-07-code-search-now-requires-login/).
This is primarily to ensure we can support the load for developers on GitHub and help protect the servers from being overwhelmed by anonymous requests from bots etc.
It is a betrayal to the developers who put our projects up there. We wanted everything to be freely accessible, and of course this is just another step in enshittification of the service. Remember that many of us have small projects with few viewers, and we know that the extra burden on the server side isn’t even measurable. Yet our work is less accessible.
The code is still accessible, you just can’t use the code search function in the web, which normal git doesn’t have anyway.