Skip to content

Migration from latest gogs (0.11.46.0418) is possible #4286

Closed
@MegaphoneJon

Description

@MegaphoneJon

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]):
    • PostgreSQL
    • MySQL
    • MSSQL
    • SQLite
  • Can you reproduce the bug at https://try.gitea.io:
    • Yes (provide example URL)
    • No
    • Not relevant

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    issue/staletype/docsThis PR mainly updates/creates documentation

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions