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
bash-5.1# git push
Enumerating objects: 8, done.
Counting objects: 100% (8/8), done.
Delta compression using up to 4 threads
Compressing objects: 100% (6/6), done.
Writing objects: 100% (6/6), 1.08 KiB | 550.00 KiB/s, done.
Total 6 (delta 1), reused 0 (delta 0)
remote: ./hooks/pre-receive.d/pre-receive: line 2: /app/gogs/gogs: No such file or directory
To https://HOSTNAME/USER/REPO.git
! [remote rejected] master -> master (pre-receive hook declined)
error: failed to push some refs to 'https://HOSTNAME/USER/REPO.git'
I did gitea admin regenerate hooks but the error remains.
bash-5.1# grep -Hnri gogs /data
/data/git/repositories/USER/REPOABC.git/hooks/pre-receive.d/pre-receive:2:"/app/gogs/gogs" hook --config='/data/gogs/conf/app.ini' pre-receive
/data/git/repositories/USER/REPOABC.git/hooks/post-receive.d/post-receive:2:"/app/gogs/gogs" hook --config='/data/gogs/conf/app.ini' post-receive
/data/git/repositories/USER/REPOXYZ.git/hooks/pre-receive.d/pre-receive:2:"/app/gogs/gogs" hook --config='/data/gogs/conf/app.ini' pre-receive
/data/git/repositories/USER/REPOXYZ.git/hooks/post-receive.d/post-receive:2:"/app/gogs/gogs" hook --config='/data/gogs/conf/app.ini' post-receive
[...] # as it seems for every repository
As far as I understand the documentation this should recreate the hooks.
I might be doing something wrong here but if I understand the documentation correctly, the hooks should be recreated but they don't change after running gitea admin regenerate hooks or using the function in the Web UI.
The text was updated successfully, but these errors were encountered:
but it seems to not touch any other existing hooks. Which sounds reasonable. But I was expecting it to modify the gogs hooks after migration. Gitea does not modify or remove the gogs hooks.
Those look like this:
/backup/data/git/repositories/USER/REPOSITORY.git/hooks/pre-receive.d # DIRECTORY
/backup/data/git/repositories/USER/REPOSITORY.git/hooks/pre-receive.d/pre-receive # ACTUAL SCRIPT
/backup/data/git/repositories/USER/REPOSITORY.git/hooks/post-receive.d
/backup/data/git/repositories/USER/REPOSITORY.git/hooks/post-receive.d/post-receive
So I assume that both pre-receive hooks will be executed after push and running the gogs hook will obviously fail.
After testing how the new hook structure will look like in gitea I assumed the gogs hooks can be deleted.
So I made a backup of my data path and executed grep -lr /app/gogs/gogs /data/git/repositories | while read ORIG; do rm -v "${ORIG}"; done
Short explanation for the later reader: grep will recursively look for the gogs application path in every file within the data directory yielding the gogs hooks file paths. For each found file remove this file.
After that I ran gitea admin regenerate hooks to make sure the gitea hooks were in place and verified this with grep -lr /app/gitea/gitea /data/git/repositories. The expected result here was and is a list of hooks matching the previous gogs output with different file name. An additional update hook is in place which is fine.
Pushes worked again.
Proposal
Please Add a comment that
existing hooks will not be touched
existing gogs hooks (after migration) will not be touched or removed
an example delete command like the one I posted for convenience
[x]
):Description
I just migrated from latest gogs 0.12.3 to gitea 1.0.2 -> 1.14.3 as documented here: (https://docs.gitea.io/en-us/upgrade-from-gogs/) - hopefully correct.
I got a bunch of warnings documented here: (https://docs.gitea.io/en-us/command-line/#doctor-recreate-table) related issue is #16201.
Problem
I did
gitea admin regenerate hooks
but the error remains.As far as I understand the documentation this should recreate the hooks.
I might be doing something wrong here but if I understand the documentation correctly, the hooks should be recreated but they don't change after running
gitea admin regenerate hooks
or using the function in the Web UI.The text was updated successfully, but these errors were encountered: