Skip to content

commit hooks not recreated after migrating from gogs #16202

Open
@Silberling

Description

@Silberling
  • Gitea version (or commit ref): 1.14.3
  • Git version:
  • Operating system: debian rpi4 docker gitea/gitea:1.14.3
  • Database (use [x]):
    • PostgreSQL
    • MySQL
    • MSSQL
    • SQLite
  • Can you reproduce the bug at https://try.gitea.io:
    • Yes (provide example URL)
    • No
  • Log gist: Migration log got lost after a temporary migration container was automatically removed. But here is my note for the commands to run: https://gist.github.com/Silberling/228cfbe8d74214d4e82f84676c256787

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

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    topic/repo-migrationMigrate repos from other platforms to Gitea, or from Gitea to them

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions