Show code in copied bare repos in existing projects

Hi guys,

my setup: Gitlab 10.5 Docker with Postgres 9.6

Short question: How do I get Gitlab to recognize bare repositories I copied into the repositories directory for already existing projects?

Example: I have a project “foo/bar” which already exists in the database. I have the content as a bare repository at some other location and copy it into the gitlab repositories directory as “foo/bar.git”. How do I get Gitlab to show me the contents instead of “this repository is empty”?

Long version:
I just had to update a very old Gitlab instance (8.5.3).

We moved all data from the old MySQL database into a new one using pgloader attached to a 8.7 docker container. Afterwards, we upgraded to 10.5 in steps, which worked like a charm regarding the database. We still have all the users, keys, settings, groups, and projects where we want them to be. However: All repositories seem empty now.

I copied the old repository directories into the new installation, changed the owner to git:git, ran gitlab:import:repos afterwards, and nothing happened.

While searching I came across many tutorials talking about importing bare repositories when the database is empty (= fresh install) where it will place them under the first admin user. That is NOT what I want. I just want the already existing projects to recognize the existing code in the repositories again.

If I do the same thing with Gogs for example, it just displays what is inside the repository as I would expect. So - I guess Gitlab keeps the repository contents synchronized somewhere in it’s database?!

Is there any script or rake task for this, like some “sync all repositories with existing git bare repos”? Because I really do not want to import almost 200 projects one by one…

Any help would be greatly appreciated - maybe I’m just overlooking something here…

mandrakey