I had the same problem on Ubuntu 24. Rebooting did not help. I uninstalled/reinstalled git via APT and it started working again. Hope this helps.