mirror of
https://github.com/go-gitea/gitea.git
synced 2026-03-11 17:46:29 -05:00
Migration from latest gogs (0.11.46.0418) is possible #1956
Closed
opened 2025-11-02 04:19:08 -06:00 by GiteaMirror
·
24 comments
No Branch/Tag Specified
main
release/v1.25
release/v1.24
release/v1.23
release/v1.22
release/v1.21
release/v1.20
release/v1.19
release/v1.18
release/v1.17
release/v1.16
release/v1.15
release/v1.14
release/v1.13
release/v1.12
release/v1.11
release/v1.10
release/v1.9
release/v1.8
v1.25.3
v1.25.2
v1.25.1
v1.25.0
v1.24.7
v1.25.0-rc0
v1.26.0-dev
v1.24.6
v1.24.5
v1.24.4
v1.24.3
v1.24.2
v1.24.1
v1.24.0
v1.23.8
v1.24.0-rc0
v1.25.0-dev
v1.23.7
v1.23.6
v1.23.5
v1.23.4
v1.23.3
v1.23.2
v1.23.1
v1.23.0
v1.23.0-rc0
v1.24.0-dev
v1.22.6
v1.22.5
v1.22.4
v1.22.3
v1.22.2
v1.22.1
v1.22.0
v1.23.0-dev
v1.22.0-rc1
v1.21.11
v1.22.0-rc0
v1.21.10
v1.21.9
v1.21.8
v1.21.7
v1.21.6
v1.21.5
v1.21.4
v1.21.3
v1.21.2
v1.20.6
v1.21.1
v1.21.0
v1.21.0-rc2
v1.21.0-rc1
v1.20.5
v1.22.0-dev
v1.21.0-rc0
v1.20.4
v1.20.3
v1.20.2
v1.20.1
v1.20.0
v1.19.4
v1.21.0-dev
v1.20.0-rc2
v1.20.0-rc1
v1.20.0-rc0
v1.19.3
v1.19.2
v1.19.1
v1.19.0
v1.19.0-rc1
v1.20.0-dev
v1.19.0-rc0
v1.18.5
v1.18.4
v1.18.3
v1.18.2
v1.18.1
v1.18.0
v1.17.4
v1.18.0-rc1
v1.19.0-dev
v1.18.0-rc0
v1.17.3
v1.17.2
v1.17.1
v1.17.0
v1.17.0-rc2
v1.16.9
v1.17.0-rc1
v1.18.0-dev
v1.16.8
v1.16.7
v1.16.6
v1.16.5
v1.16.4
v1.16.3
v1.16.2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v1.4.0-rc1
v1.3.2
v1.3.1
v1.3.0
v1.3.0-rc2
v1.3.0-rc1
v1.2.3
v1.2.2
v1.2.1
v1.2.0
v1.2.0-rc3
v1.2.0-rc2
v1.1.4
v1.2.0-rc1
v1.1.3
v1.1.2
v1.1.1
v1.1.0
v1.0.2
v1.0.1
v1.0.0
v0.9.99
Labels
Clear labels
$20
$250
$50
$500
backport/done
💎 Bounty
docs-update-needed
good first issue
hacktoberfest
issue/bounty
issue/confirmed
issue/critical
issue/duplicate
issue/needs-feedback
issue/not-a-bug
issue/regression
issue/stale
issue/workaround
lgtm/need 2
modifies/api
modifies/translation
outdated/backport/v1.18
outdated/theme/markdown
outdated/theme/timetracker
performance/bigrepo
performance/cpu
performance/memory
performance/speed
pr/breaking
proposal/accepted
proposal/rejected
pr/wip
pull-request
reviewed/wontfix
💰 Rewarded
skip-changelog
status/blocked
topic/accessibility
topic/api
topic/authentication
topic/build
topic/code-linting
topic/commit-signing
topic/content-rendering
topic/deployment
topic/distribution
topic/federation
topic/gitea-actions
topic/issues
topic/lfs
topic/mobile
topic/moderation
topic/packages
topic/pr
topic/projects
topic/repo
topic/repo-migration
topic/security
topic/theme
topic/ui
topic/ui-interaction
topic/ux
topic/webhooks
topic/wiki
type/bug
type/deprecation
type/docs
type/enhancement
type/feature
type/miscellaneous
type/proposal
type/question
type/refactoring
type/summary
type/testing
type/upstream
Mirrored from GitHub Pull Request
Milestone
No items
No Milestone
Projects
Clear projects
No project
No Assignees
Notifications
Due Date
No due date set.
Dependencies
No dependencies set.
Reference: github-starred/gitea#1956
Reference in New Issue
Block a user
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @MegaphoneJon on GitHub (Jun 20, 2018).
The gitea documentation says you must upgrade from 0.9.146 of gogs, but (at least anecdotally) I'm able to upgrade from the latest version as of this writing (0.11.46.0418). I may submit a PR to the docs after I've run this in production for a few weeks, but for now I want to write this up so others can find it if necessary.
[x]):Description
I migrated from one Docker image to another.
In addition to the steps outlined in the Upgrade from gogs doc, I also had to change every instance of
gogsin myconf/app.inifile togitea. I also had to change myPATH(under[database]) to/data/gitea/data/gitea.db(the gogs container has symlinks from/appthat gitea doesn't). Also myROOT_PATH(underlog) changed from/app/gogs/logto/data/gitea/log.Once I did that, I had gitea 1.0.2 working. Two more changes I had to make owing to my newer gogs version:
.ssh/authorized_keysfile (from the Web UI's admin panel). Failure to do this resulted in the following error:findcommand at https://github.com/go-gitea/gitea/issues/3558#issuecomment-372429183). If you don't delete them you'll receive the following error:Finally - SSH push/pulls didn't work properly for me even after doing all these things until I upgraded to version 1.4. I couldn't upgrade directly - I assume this is related to #4424 - but I was able to go 1.0 » 11 » 1.2 » 1.3 » 1.4 painlessly. Once I was on 1.4 everything worked properly.
@lunny commented on GitHub (Jun 21, 2018):
Please feel free to send a PR
@MegaphoneJon commented on GitHub (Jun 21, 2018):
I'm going to wait until this has been in production for a while before submitting a PR. I didn't analyze the database structure between a fresh gitea db and my own, for instance.
@furai commented on GitHub (Jul 5, 2018):
Have you run into any issues so far?
@MegaphoneJon commented on GitHub (Jul 5, 2018):
@furai No, I haven't. I feel pretty confident at this point in what I did, so I'll make a TODO for myself to submit a PR to the documentation.
@furai commented on GitHub (Jul 6, 2018):
Did you compare the databases?
@MegaphoneJon commented on GitHub (Jul 6, 2018):
@furai I haven't - which is why I need to set aside some time for this task. I was a bit glib in suggesting I just needed to write up my docs.
@w-flo commented on GitHub (Jul 29, 2018):
Thanks, this seems to have worked for me starting from gogs 0.11.56.x.
Obviously I don't know if there are any DB inconsistencies. The DB migration process printed a bunch of yellow warnings (?) while migrating gitea from 1.0 to latest via the different 1.x releases, but maybe that's expected.
@marcolivier commented on GitHub (Jul 30, 2018):
Thanks for the instructions—it was a quick and easy transition from the latest version of Gogs to 1.0.2 and then slowly to 1.1, 1.2, 1.3, 1.4 and finally 1.5. I could've probably went straight to 1.5 but I wanted to play it safe.
I haven't encountered any problem yet but my DB was pretty small.
@furai commented on GitHub (Aug 1, 2018):
I'm mostly interested whether PR and comments get migrated and all the settings for webhooks and git hooks. That's the most important thing for me.
@atom0s commented on GitHub (Aug 1, 2018):
I just migrated personally and yes, they all migrated with it. The only thing that had a problem was Discord web hooks had to be manually fixed in the database. (Gogs marks them as ID 3, Gitea is 4. So a simple query fixes it.) My experience with moving to Gitea here: https://github.com/go-gitea/gitea/issues/4538
@furai commented on GitHub (Aug 1, 2018):
That's good news. What secret are you talking about in your issue? What can it be used for? I'm trying to figure out if my users might have been relying on it.
@atom0s commented on GitHub (Aug 1, 2018):
With the web hooks, there is a secret key that can be sent with the hooks request. On Gogs, this was more recently changed on how it was sent. It used to be sent as "secretkey" inside of the data (json blob) but was changed to be a header and was also changed to be a hash of the key vs. the raw key itself.
On Gitea, this is reverted back to the old setup of Gogs where its sent in the data and is the raw key.
@techknowlogick commented on GitHub (Aug 1, 2018):
To be clear it was not reverted back, Gitea forked from Gogs at a certain point, and no developer contributed the code to Gitea that was contributed to Gogs. There is a ticket for this functionality to be added, however no developer has taken up the cause to add it to Gitea. Perhaps you could.
Edit: #3901 is the ticket I am referencing.
@Obihoernchen commented on GitHub (Sep 29, 2018):
Just upgraded latest Gogs 0.11.66 to Gitea 1.5.1 👍
I copied my gogs mysql database, followed https://docs.gitea.io/en-us/upgrade-from-gogs/, edited my app.ini and upgraded from 1.0.2 > 1.1.4 > 1.2.3 > 1.3.3 > 1.4.3 > 1.5.1. A direct upgrade from 1.02 to 1.5.1 failed, so I upgraded step by step.
Afterwards go to Admin panel and regenerate hooks, update ssh keys etc.
Edit: Have a look in
gitea-repositoriesand search for gogsgrep -R gogs. There might be some hook leftovers you have to delete.So far everything seems to work as expected 👍
@stale[bot] commented on GitHub (Jan 7, 2019):
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs during the next 2 weeks. Thank you for your contributions.
@nougad commented on GitHub (Feb 3, 2019):
I was able to directly update from gogs 0.11.79 (archlinux aur) to gitea 1.7.1 (archlinux community) with postgres.
Steps done:
update version set version = 13rm /var/lib/gitea/repo/*/*.git/hooks/post-receive.d/post-receive /var/lib/gitea/repo/*/*.git/hooks/pre-receive.d/pre-receiveand executeResynchronize pre-receive, update and post-receive hooks of all repositories.in giteaAfterwards everything was working. While I would not necessarily recommend it, at least I want to mention that it's possible.
(ref: https://github.com/go-gitea/gitea/issues/5318)
@KuDeSnik33ra commented on GitHub (Feb 13, 2019):
Where "update version set version = 13" should be executed?
@lafriks commented on GitHub (Feb 13, 2019):
@KuDeSnik33ra in your database tools connected to Gitea database
@stale[bot] commented on GitHub (Apr 14, 2019):
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs during the next 2 weeks. Thank you for your contributions.
@ottes commented on GitHub (Apr 16, 2019):
Migration itself worked fine from gogs 0.11, but all my users were ldap users (except one admin user) and they are not able to login anymore.
The users are there, all have the correct auth source, the ldap auth-settings itself are correct too, but i can't select the auth-method on the login page.
I'm using sqlite database and can't see any other errors in the log or any other place, any idea?
@lafriks commented on GitHub (Apr 18, 2019):
You don't need to select auth method on login page. If you have configured and enabled auth source in login page users should authorize standard username/password login
@stale[bot] commented on GitHub (Jun 17, 2019):
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs during the next 2 weeks. Thank you for your contributions.
@stale[bot] commented on GitHub (Jul 1, 2019):
This issue has been automatically closed because of inactivity. You can re-open it if needed.
@louzadod commented on GitHub (Nov 3, 2020):
It is a SQL update on the Gogs database. Postgresql in my case.