Unknown error occuring after a few days of using Gitlab

So I've been struggeling with an issue for a number of weeks already. The issue is that after a fresh install of Gitlab I can commit to my (private) repositories without an issue. However after a few days Gitlab refuses to accept the commits, complaining about a pre commit hook (I don't think I have set them up) on the server rejecting the commit. If I make a change via edit file on the website itself and press the Commit changes button I get a red bar with a red exclamation mark without any text (the regular error message banner but no text). What I found out was that if I start messing with the permissions of the gitdata folder, and using docker exec -it gitlab update-permissions I can get it working sometimes, but after a few days the same issue reoccurs.

Today I spotted this error in the /var/log/gitlab/gitlab-rails/exceptions_json.log:

{"severity":"ERROR","time":"2020-07-02T17:22:33.706Z","correlation_id":"o26QNg4WBQa","tags.correlation_id":"o26QNg4WBQa","tags.locale":"en","user.id":2,"user.email":"","user.username":"ThaStealth","exception.class":"Gitlab::Git::PreReceiveError","exception.message":"","exception.backtrace":["lib/gitlab/gitaly_client/operation_service.rb:338:in user_commit_files'","lib/gitlab/git/repository.rb:881:in block in multi_action'","lib/gitlab/git/wraps_gitaly_errors.rb:7:in wrapped_gitaly_errors'","lib/gitlab/git/repository.rb:880:in multi_action'","app/models/repository.rb:821:in block in multi_action'","app/models/repository.rb:804:in with_cache_hooks'","app/models/repository.rb:821:in multi_action'","app/models/repository.rb:794:in update_file'","app/services/files/update_service.rb:6:in create_commit!'","app/services/commits/create_service.rb:29:in execute'","app/controllers/concerns/creates_commit.rb:25:in create_commit'","app/controllers/projects/blob_controller.rb:75:in update'","app/controllers/application_controller.rb:497:in set_current_admin'","lib/gitlab/session.rb:11:in with_session'","app/controllers/application_controller.rb:488:in set_session_storage'","app/controllers/application_controller.rb:482:in set_locale'","lib/gitlab/error_tracking.rb:51:in with_context'","app/controllers/application_controller.rb:547:in sentry_context'","app/controllers/application_controller.rb:475:in block in set_current_context'","lib/gitlab/application_context.rb:52:in block in use'","lib/gitlab/application_context.rb:52:in use'","lib/gitlab/application_context.rb:20:in with_context'","app/controllers/application_controller.rb:468:in `set_current_context'"]}

The system is running on Docker on a Ubuntu 20.04 server

To upload designs, you'll need to enable LFS and have an admin enable hashed storage. More information