Skip to content

Wiki broken after gitea migration due to old version in update hook #1295

Closed
@zxcvbn4038

Description

@zxcvbn4038

I moved from Gitea 1.0.2 to 1.1.0 - the migration process appeared to complete successfully according to details in xorm.log.

Later when trying to add a new wiki page I received a 500 error.

In gitea.log I see this message:

2017/03/16 22:03:45 [...routers/repo/wiki.go:445 NewWikiPost()] [E] AddWikiPage: Push: exit status 1 - remote: hooks/update: line 2: /xx/xx/gitea-1.0.2-darwin-10.6-amd64: No such file or directory
remote: error: hook declined to update refs/heads/master
To /xx/xx/gitea-repositories/xx/xx.wiki.git
 ! [remote rejected] master -> master (hook declined)
error: failed to push some refs to '/xx/xx/gitea-repositories/xx/xx.wiki.git'

Where the problem is that I've removed the binary for the previous version of gittea, however it is still being referenced in the update hook for the wiki git repo.

I did the resync hooks option in the admin panel and it did not resolve the problem. When manually changing the hook to reference the newer version of gitea I received a different 500 error despite the path being correct and executable:

2017/03/16 22:32:44 [...routers/repo/wiki.go:445 NewWikiPost()] [E] AddWikiPage: Push: exit status 1 - remote: No help topic for 'update'
remote: error: hook declined to update refs/heads/master
To /xx/xx/gitea-repositories/xx/xx.wiki.git
 ! [remote rejected] master -> master (hook declined)
error: failed to push some refs to '/xx/xx/gitea-repositories/xx/xx.wiki.git'

After restoring the 1.0.2 binary to the old location and changing the update hook back to the old version I was able to successfully update the wiki.

I looked at some of my non-wiki repos and the hooks for those had been updated to the 1.1.0 version so this seems to just be isolated to the wiki repos.

Metadata

Metadata

Assignees

No one assigned

    Labels

    issue/duplicateThe issue has already been reported.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions