I've also encountered some weird issues with resolving packages all of a sudden.
Turned out I had this section in my ~/.gitconfig file
[safe]
bareRepository = explicit
Changing explicit
toall
fixed the issue for me. This is a potential security risk but that line was not there before and the default value is all.
This section was not present 10 days ago. In the meantime, I've upgraded macOS from 15.0 to 15.1 but I've also upgraded quite a few brew formulae. I'm doubting any of this would change the .gitconfig file but have no explanation so far.
Anyway, if you're having issues with package resolution, check if you've got that git configuration set.