[SOLVED] Invalid repo error after moving to new docker host

After moving my Gitea instance to a new host, everything appears to be working except for viewing repositories. I get a 500 page when trying to view any repository.

My Gitea is running in docker, so I used the exact same docker-compose.yml file to spin it up on the new host. Then I copied the gitea-dump-*.zip file into the new gitea container, and copied all the relevant files based on these instructions: Backup and Restore | Gitea Documentation. For the SQLite DB,

Here is the error from the logs:

2023/05/20 09:30:00 ...ules/context/repo.go:598:RepoAssignment() [E] RepoAssignment Invalid repo /data/git/repositories/myuser/gitea-docker.git: exit status 128 - fatal: not a git repository (or any parent up to mount point /)
	Stopping at filesystem boundary (GIT_DISCOVERY_ACROSS_FILESYSTEM not set).

I did docker exec -it gitea-container bash and manually checked the repositories location… all the files are there, and they are all owned by the git user.

Does anybody know how to fix this?

1 Like

Ok forgive me… I fixed it myself. The repositories did not get put in the correct spot when I was doing the restore process. I feel silly lol.

2 Likes