If your git repo is self hosted, check the file system rights on the remote git directory. If this gets corrupted, it is possible that your git server just doesn’t have rights.
For instance, I host my own gitosis system on Ubuntu server. When I create the git repo on the server, I run sudo git init --bare <repo name>
I then have to run sudo chgrp -R gitosis <repo name> && sudo chown -R gitosis <repo name>
.