Failed to restore the backup repository

Dispaly “The Git data underlying this repository cannot be read. Contact the administrator of this instance or delete this repository.”

I followed this document (Using docker).

I check the log.

...ices/context/repo.go:937:func91() [E] GetBranchCommit: 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).
...ers/web/repo/view.go:950:renderHomeCode() [E] GitRepo.IsEmpty: check empty: exit status 128 - fatal: not a git repository: '/data/git/repositories/zhangqinghao0811/test3.git'

I found the problem, there’s something wrong with the document.

To restore the repository, the document let me do this:

# restore the repositories itself
mv repos/* /data/git/gitea-repositories/

But the default path to docker repositories is /data/git/repositories.

So gitea can’t find the data of repositories.

Then I manually copied the data to the correct path and I successfully restored my repository.