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

Gogs migration tool #30983

Open
officereso opened this issue May 15, 2024 · 3 comments
Open

Gogs migration tool #30983

officereso opened this issue May 15, 2024 · 3 comments
Labels
proposal/rejected We have reviewed the proposal but disagree in that it should not be implemented into Gitea. type/proposal The new feature has not been accepted yet but needs to be discussed first.

Comments

@officereso
Copy link

Feature Description

I currently have a gogs deployed v0.14, specifically commit gogs/gogs@c8cd3e7. It doesn't seem like there's any good way to migrate over to gitea anymore.
The steps documented on the wiki are problematic

  1. "Copy gogs/custom/conf/app.ini to gitea/custom/conf/app.ini"
    a. Several config options found in a modern app.ini arnt recognizable to gitea
  2. mysql_native_password
    a. If this was resolved the steps provided on the wiki to migrate the database over might maybe work. Doesnt seem like gitea supports modern MySQL8 authorization plugins making the steps "Launch every major version of the binary" not possible. Earliest version that I tried that could actually login to mysql was 1.6.4, but by then gogs and gitea had already differed.

It would be really nice to have a proper tool that can be ran either against the gogs database or maybe the gogs backup zip that can convert it over to gitea.

Screenshots

No response

@officereso officereso added the type/proposal The new feature has not been accepted yet but needs to be discussed first. label May 15, 2024
@lunny
Copy link
Member

lunny commented May 21, 2024

Since Gitea's code base is totally different from Gogs, I don't think there is any easy way to do that and I can't expect it in the future. Because no Gitea maintainer would like to read Gogs' code. There are two ways to migrate to Gitea from Gogs now.

  • Migrate one repository by one repository with Gitea's UI or API, you can easily write a script to do that. But since Gogs's API doesn't cover all the features, only a part of them will be migrated.
  • Migrate only git data to Gitea. You can use Gitea's adopt repository feature to import all the repositories one time.

@lunny lunny added the proposal/rejected We have reviewed the proposal but disagree in that it should not be implemented into Gitea. label May 21, 2024
@officereso
Copy link
Author

I did manage to get most migrated with the exception of avatars by making some modifications to this sql script. https://github.com/lesh59/Gogs2Gitea. I think a bulk of the work would just be database related, although I'm not familiar enough with either code base to say for certain.

@lunny
Copy link
Member

lunny commented May 21, 2024

The git hooks, avatars/lfs/attachments and etc. folder structures may also be different.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
proposal/rejected We have reviewed the proposal but disagree in that it should not be implemented into Gitea. type/proposal The new feature has not been accepted yet but needs to be discussed first.
Projects
None yet
Development

No branches or pull requests

2 participants