In gitea the git push failed

From one day to another a ‘git push’ to agitea server failed .

Problem

git push gives the following error

Counting objects: 34, done.
Delta compression using up to 8 threads.
Compressing objects: 100% (31/31), done.
Writing objects: 100% (34/34), 10.22 KiB | 0 bytes/s, done.
Total 34 (delta 16), reused 0 (delta 0)
To https://gitea.XXX.de/YYY/etckeeper.git
 ! [remote rejected] mail.XXX.de -> mail.XXX.de (unable to migrate objects to permanent storage)
error: failed to push some refs to 'https://gitea.XXX.de/YYY/etckeeper.git'

Solution

Due to an OS upgrade in debian 9 the directory rights where changed when the program was called with a systemd service. Solution is taken from here https://bbs.archlinux.org/viewtopic.php?pid=1820377#p1820377 and consists in the following steps

root@core1:.../systemd/system# mkdir gitea.service.d

root@core1:.../systemd/system# cat gitea.service.d/override.conf

[Service]
ReadWritePaths=/home/git/gitea-repositories

After these changes :

service gitea stop
systemctl daemon-reload
service gitea start
service gitea status

the process worked.

Environment

Software Release(s)
Debian 9
gitea 1.7.3 built with go1.11.5 : bindata, sqlite, sqlite_unlock_notify