We have a problems with the submodule URL when restoring the backup on a new server

Problem to solve

When restoring the Gitlab backup on a new server, the following problem occurred due to git.fsck

"level":"error","msg":"restore: pipeline: 1 failures encountered:\n - @hashed/../../....git (repository-name¦··
actor): manager: restore from bundle: restore bundle: restore bundle: \"default/@hashed/../../.....git/1628261_2024_10_07_1¦··
7.4.0/001.bundle\": remote repository: fetch bundle: rpc error: code = Internal desc = fetch bundle: exit status 1, stderr: \"error: object .....: gitm¦··
odulesUrl: disallowed submodule url: https://user:Token@gitlab.local:repository-name.git\\nfatal: fsck error in packed object\\nerror: index-pack¦··
 died\\n\"\n","pid":105192,"time":"2024-10-07T12:00:00.778Z"}

This change was made a long time ago (8 months) and the problem has not occurred until now. The backup restore is checked once a week.
There were no problems with crating the backup.
The backup is performed using gitlab-backup create

We also checked the repository with git fsck --full and all repositories with gitlab-rake gitlab:git:fsck without errors

An attempt was made to not perform the check using gitaly['configuration'] in the gitlab.rb but this was unsuccessful.
The following settings were made in the gitlab.rb

gitaly['configuration'] = {
         git: {
          config: [
            { key: "fetch.fsck.gitmodulesUrl", value: "ignore" },
            { key: "fsck.gitmodulesUrl", value: "ignore" },
			{ key: "receive.fsck.gitmodulesUrl", value: "ignore" },
          ],
         },
    }

The problem could only be avoided by not backing up the project using SKIP_REPOSITORIES_PATHS

Versions

  • Self-managed Version

Versions

  • GitLab 17.4.1