Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Closed
zxcvbn4038 opened this issue Mar 17, 2017 · 5 comments
Closed
Labels
issue/duplicate The issue has already been reported.

Comments

@zxcvbn4038
Copy link

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.

@zxcvbn4038
Copy link
Author

This might be related to #1250

@lunny
Copy link
Member

lunny commented May 4, 2017

Yes. This should be fixed by #1257. Let's close this and please feel free to reopen it.

@lunny lunny closed this as completed May 4, 2017
@lunny lunny added the issue/duplicate The issue has already been reported. label May 4, 2017
@gayprogrammer
Copy link

For anyone whose wiki broke because of this, the fix after upgrading is:
Enter Gitea admin panel on the UI, run "Resync pre-receive, update and post-receive hooks of all repositories."

@zxcvbn4038
Copy link
Author

@razzintown @lunny Thats great news! Thank you!

@zxcvbn4038
Copy link
Author

@razzintown @lunny Confirmed that the issue is resolved in 1.1.1

@go-gitea go-gitea locked and limited conversation to collaborators Nov 23, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
issue/duplicate The issue has already been reported.
Projects
None yet
Development

No branches or pull requests

3 participants