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.
- Gitea version (or commit ref): 1.4.2+6-gcaee487 built with: bindata, sqlite
- Git version: 2.15.2
- Operating system: Alpine Linux 3.7.0
- Database (use
[x]):
- Can you reproduce the bug at https://try.gitea.io:
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 gogs in my conf/app.ini file to gitea. I also had to change my PATH (under [database]) to /data/gitea/data/gitea.db (the gogs container has symlinks from /app that gitea doesn't). Also my ROOT_PATH (under log) changed from /app/gogs/log to /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:
- I had to regenerate my
.ssh/authorized_keys file (from the Web UI's admin panel). Failure to do this resulted in the following error:
bash: /app/gogs/gogs: No such file or directory
fatal: Could not read from remote repository.
remote: ./hooks/pre-receive.d/pre-receive: line 2: /app/gogs/gogs: No such file or directory
To ssh://git.example.com:10022/user/repo.git
! [remote rejected] master -> master (pre-receive hook declined)
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.
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 How can i switch from gogs to gitea with less pain? #3558 (comment)). 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.