After several failed attempts to use other's scripts, I stumbled upon the following option. Worked alright for 40+ of my repos, YMMV
-
backup gogs repo with gogs backup
docker exec -it gogs_container_namebash8698765c2e8a:/app/gogs# USER=git ./gogs backup
-
copy the file and unzip the gogs-backup.zip
-
extract
gogs-backup/repositories.zip(has all the bare repos) -
copy them to forgejo's container
/data/git/repositories/<username>- you may also want to run
chown -R 1000:1000 /data/git/repositories/<username>post copy based on your setup
- you may also want to run
-
from forge's admin panel url/admin/repos (admin settings -> code-assets -> repositories)
- search by username
- unadapted repositories
- adopt each of those repos
To map old url post upgrade, set conf/gitea/app.ini ROOT_URL to old-gogs.selfhosted.com (old url)