Import rake task fails with repositories with git hooks

Summary

Due to the hooks directory of the repo to import is a symlink pointing to a place it can’t write to

sudo gitlab-rake gitlab:import:repos

Unable to save project. Error: Failed to create repository

gitlab-shell failed with error 1: fatal: cannot copy '/opt/gitlab/embedded/share/git-core/templates/hooks/pre-commit.sample' to '/var/opt/gitlab/git-data/repositories/new_group/<repo_to_import.git/hooks/pre-commit.sample': Permission denied

https://gitlab.zendesk.com/agent/tickets/84098

Assignee Loading
Time tracking Loading