You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I noticed that the git hooks stopped working (after migrating to another server). Rewriting the hooks from the administration panel did not yield any results. Newly created repositories work fine, but the pre-migration ones do not. I noticed that the file permissions of the hooks directory differ:
ls -lah old-repo.git/hooks/
total 76K
drwxrwxr-x 5 gitea gitea 4,0K Jun 12 09:32 ./
drwxrwxr-x 7 gitea gitea 4,0K Mai 29 14:43 ../
-rw-rw-r-- 1 gitea gitea 478 Jun 25 2017 applypatch-msg.sample
-rw-rw-r-- 1 gitea gitea 896 Jun 25 2017 commit-msg.sample
-rw-rw-r-- 1 gitea gitea 303 Jun 12 09:29 post-receive
drwxrwxr-x 2 gitea gitea 4,0K Jun 12 09:32 post-receive.d/
-rw-rw-r-- 1 gitea gitea 189 Jun 25 2017 post-update.sample
-rw-rw-r-- 1 gitea gitea 424 Jun 25 2017 pre-applypatch.sample
-rw-rw-r-- 1 gitea gitea 1,7K Jun 25 2017 pre-commit.sample
-rw-rw-r-- 1 gitea gitea 1,3K Jun 25 2017 prepare-commit-msg.sample
-rw-rw-r-- 1 gitea gitea 1,4K Jun 25 2017 pre-push.sample
-rw-rw-r-- 1 gitea gitea 4,9K Jun 25 2017 pre-rebase.sample
-rw-rw-r-- 1 gitea gitea 303 Jun 12 09:29 pre-receive
drwxrwxr-x 2 gitea gitea 4,0K Jun 25 2017 pre-receive.d/
-rw-rw-r-- 1 gitea gitea 544 Jun 25 2017 pre-receive.sample
-rw-rw-r-- 1 gitea gitea 283 Jun 12 09:29 update
drwxrwxr-x 2 gitea gitea 4,0K Jun 25 2017 update.d/
-rw-rw-r-- 1 gitea gitea 3,6K Jun 25 2017 update.sample
ls -lah new-repo.git/hooks/
total 72K
drwxr-xr-x 5 gitea gitea 4,0K Jun 12 09:36 ./
drwxr-xr-x 7 gitea gitea 4,0K Jun 12 09:36 ../
-rwxr-xr-x 1 gitea gitea 478 Jun 12 09:36 applypatch-msg.sample*
-rwxr-xr-x 1 gitea gitea 896 Jun 12 09:36 commit-msg.sample*
-rwxr-xr-x 1 gitea gitea 303 Jun 12 09:36 post-receive*
drwxr-xr-x 2 gitea gitea 4,0K Jun 12 09:36 post-receive.d/
-rwxr-xr-x 1 gitea gitea 189 Jun 12 09:36 post-update.sample*
-rwxr-xr-x 1 gitea gitea 424 Jun 12 09:36 pre-applypatch.sample*
-rwxr-xr-x 1 gitea gitea 1,7K Jun 12 09:36 pre-commit.sample*
-rwxr-xr-x 1 gitea gitea 1,3K Jun 12 09:36 prepare-commit-msg.sample*
-rwxr-xr-x 1 gitea gitea 1,4K Jun 12 09:36 pre-push.sample*
-rwxr-xr-x 1 gitea gitea 4,8K Jun 12 09:36 pre-rebase.sample*
-rwxr-xr-x 1 gitea gitea 303 Jun 12 09:36 pre-receive*
drwxr-xr-x 2 gitea gitea 4,0K Jun 12 09:36 pre-receive.d/
-rwxr-xr-x 1 gitea gitea 283 Jun 12 09:36 update*
drwxr-xr-x 2 gitea gitea 4,0K Jun 12 09:36 update.d/
-rwxr-xr-x 1 gitea gitea 3,6K Jun 12 09:36 update.sample*
Deleting old-repo.git/hooks and rewriting hooks from the admin panel fixes the problem and recreates the hooks dir with the same permissions as newly created repositories (but the sample files do not get recreated).
ls -lah new-repo.git/hooks/
total 32K
drwxr-xr-x 5 gitea gitea 4,0K Jun 12 09:48 ./
drwxrwxr-x 8 gitea gitea 4,0K Jun 12 09:48 ../
-rwxr-xr-x 1 gitea gitea 303 Jun 12 09:48 post-receive*
drwxr-xr-x 2 gitea gitea 4,0K Jun 12 09:48 post-receive.d/
-rwxr-xr-x 1 gitea gitea 303 Jun 12 09:48 pre-receive*
drwxr-xr-x 2 gitea gitea 4,0K Jun 12 09:48 pre-receive.d/
-rwxr-xr-x 1 gitea gitea 283 Jun 12 09:48 update*
drwxr-xr-x 2 gitea gitea 4,0K Jun 12 09:48 update.d/
The text was updated successfully, but these errors were encountered:
tobias--
changed the title
Permissions for hooks inconsistent
File permissions not being updated/checked on rewrite
Jun 12, 2018
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs during the next 2 weeks. Thank you for your contributions.
[x]
):Description
I noticed that the git hooks stopped working (after migrating to another server). Rewriting the hooks from the administration panel did not yield any results. Newly created repositories work fine, but the pre-migration ones do not. I noticed that the file permissions of the hooks directory differ:
Deleting old-repo.git/hooks and rewriting hooks from the admin panel fixes the problem and recreates the hooks dir with the same permissions as newly created repositories (but the sample files do not get recreated).
The text was updated successfully, but these errors were encountered: