Not detecting gitlab repo, no customs_hook create

using 3.3.6 + gitlab 12.
As what docs mentioned. When configure, a line shows below should appear.
“Git repository is served by GitLab, hooks will be installed into ‘custom_hooks’ directory”
But not! So, when it finished install nothing was showed in gitlab web ui until I manually refresh the gitlab git cache.

Hello.

The latter is a known issue: GitLab caches UI-related information, so it could seem empty even when it’s not, especially immediately after the initial import. There’re 2 possible workarounds:

  • clear UI-related cache with the following command:

    sudo gitlab-rake cache:clear
    

to clear UI-related caches once after the initial translation.

  • (the preferred way) push something to the Git repository. This will also trigger updating caches and also make SubGit update the UI upon fetching new SVN revisions.

The latter way, however, may not work due to hooks directory absence, so it’s better to find the cause of the hooks directory issue first. Could you advise, does SubGit runs on the same machine (or, maybe, a Docker container) where GitLab is installed or it lives in another accessing the repository not locally?

@ildarhm Thanks for the prompt reply and workaround advises.

Yes, they run on the same machine.

I have tried edit the config file after configure:
[HOOKS]
directory = /path/to/repo/custom_hooks

It do generated some hook files in custom_hooks folder, but gitlab still shows nothing after install complete.

Addin the directory manually is indeed a workaround for the case when the GitLab environment is not being recognized. However, the GitLab UI issue appears even if the hooks directory is created – due to the way GitLab works, SubGit doesn’t have enough data (repository ID, to be precise) to update GitLab UI automatically. So this can be resolved either by cache clear or by the very first push.

We have just tested it and found that indeed SubGit doesn’t recognize GitLab environment with GitLab 12 repositories, we are working to fix this.

r4306 of trunk: an attempt to fix the problem.

@dmitry.pavlenko @ildarhm Good to know. Thanks