Skip to content

No wiki for migrated repo #3792

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

Closed
cracker0dks opened this issue Oct 21, 2016 · 18 comments
Closed

No wiki for migrated repo #3792

cracker0dks opened this issue Oct 21, 2016 · 18 comments
Labels
💊 bug Something isn't working status: needs feedback Tell me more about it
Milestone

Comments

@cracker0dks
Copy link

cracker0dks commented Oct 21, 2016

Hey,
I use the latest Dockerversion of Gogs and migrated a lot of repos successfully. But all of them have no wiki and are showing error 500 when I want to visit the wiki.
The Server log shows:
2016/10/21 03:02:24 [...routers/repo/wiki.go:54 renderWikiPage()] [E] GetBranchCommit: object does not exist [id: refs/heads/master, rel_path: ]

If I make a new test repo iside the gogs page, I can add a wiki as intended.

Is this my fault? How can I add a wiki to a migrated repo?

Thanks :)

PS: I dont want to migrate the wiki... I just want to be able to add a new one after code migration.

@wytzevanderploeg
Copy link

I have the same problem and it appears that the migrated wiki repositories do not have a master branch. (located next to the original repository in the gogs repositories folder)

When I run a git branch I do not see a master branch in the migrated repositories. Which is confirming what the error log states.

Since I only have empty wiki's my workaround was to delete the existing/migrated wiki repository and copy the one from the locally created test project which does have a master branch.

@ghost
Copy link

ghost commented Dec 8, 2016

+1

thank you for serve awesome project 'gogs'.

i do gitlab to gogs migrate. created project, code, issue, pull requrests, commits, releases all successfully migrated. but just wiki is response 500 error, not opened.
log is here:
2016/12/08 09:14:13 [...routers/repo/wiki.go:54 renderWikiPage()] [E] GetBranchCommit: object does not exist [id: refs/heads/master, rel_path: ]

2016-12-08 18-34-44

@y4my4my4m
Copy link

@512gbyte I had the same issue, you need to update your server's git version. I think it needs to run 2.7.1 or higher.

I was running 1.5* something, deleted the .git, created a new repo, pushed and every works as intended.

Hope this helps

@ghost
Copy link

ghost commented Dec 12, 2016

git version is 2.7.4. this is running on aws (ubuntu-server-16.04)..

@y4my4my4m
Copy link

@512gbyte that's strange..I had the exact same error and problem as you and updating fixed it. Can you try upgrading it more? I'm currently running git 2.8^ . I'm sure you've tried already but just in case, since you mentioned you're migrating from previously existing gits,

  1. In admin settings -> Rewrite all hooks.

  2. Create a new repository from scratch, try creating a wiki.

I doubt No.2 will work but doesn't hurt to try ¯_(ツ)_/¯

@ghost
Copy link

ghost commented Dec 15, 2016

thanks for reply!
i choose No.2 options, my wiki is not important but i just want to notice this case. 😄
i really satisfied 'gogs'!

@y4my4my4m
Copy link

@ghost so it worked?

@cracker0dks
Copy link
Author

cracker0dks commented Dec 22, 2016

Ok, I got an easy workaround for the 500 Error.
Go to the repo -> settings -> delete all wiki data
Then activate the wiki function again.
Now you can use the wiki without problem 👍

@unknwon
Copy link
Member

unknwon commented Dec 22, 2016

@cracker0dks where did you migrate from? Gogs tries to clone related wiki repository if exists, see https://github.com/gogits/gogs/blob/master/models/repo.go#L640-L650

@unknwon unknwon added the status: needs feedback Tell me more about it label Dec 22, 2016
@jxsl13
Copy link
Contributor

jxsl13 commented Feb 1, 2017

Same issue, migrated from gitlab.com
cracker0dks' workaround works, for now :)
Hopefully migrated wikis will be either initialised or copied from e.g. github if it's a github project.

@unknwon
Copy link
Member

unknwon commented Feb 1, 2017

Failed from gitlab.com because I think it always requires a password? I can migrate any public repo with wiki from GitHub without any problem.

@jxsl13
Copy link
Contributor

jxsl13 commented Feb 1, 2017

I mean that even tho no wiki got migrated (btw. I had no wiki), you don't get the page to create a new wiki entry, but instead a 500 error page.

@unknwon
Copy link
Member

unknwon commented Feb 1, 2017

@jxsl13 can you create an example on demo site? (500 on wiki after migration)

@jxsl13
Copy link
Contributor

jxsl13 commented Feb 1, 2017

@unknwon
Copy link
Member

unknwon commented Feb 1, 2017

@jxsl13 Thanks! What is the source URL so I can perform clone on my machine?

@jxsl13
Copy link
Contributor

jxsl13 commented Feb 1, 2017

was actually a private project on gitlab: made it public https://gitlab.com/jxsl13/Informatik-A

@unknwon
Copy link
Member

unknwon commented Feb 1, 2017

I might know the problem: Gogs detected that there is a wiki, but failed to clone and didn't clean up the directory. Will check on that, thanks for the info!

@unknwon unknwon added 💊 bug Something isn't working and removed status: needs feedback Tell me more about it labels Feb 1, 2017
@unknwon unknwon added this to the 0.10.0 milestone Feb 1, 2017
@unknwon unknwon added the status: needs feedback Tell me more about it label Feb 10, 2017
@unknwon
Copy link
Member

unknwon commented Feb 10, 2017

Patch has pushed to fix this issue, please test on develop branch or https://try.gogs.io.

Note the already broken ones still won't work, but newly migrate ones should work.

@unknwon unknwon closed this as completed Feb 18, 2017
Martchus pushed a commit to Martchus/gogs that referenced this issue Aug 27, 2018
…a page that fits into the viewport (gogs#3792)

Signed-off-by: Liam Cottam <[email protected]>
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Apr 14, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
💊 bug Something isn't working status: needs feedback Tell me more about it
Projects
None yet
Development

No branches or pull requests

5 participants