Problem with reconfigurating gitlab after changing repository locations

Im running gitlab on a pi 4 and i have an external drive connected to it. I have the correct gitlab distribution (bullseye) and ive follow the gitlab wiki on how to install, mount /var/opt/gitlab which i have and ive also chaged the repo location in the gitlab.rb file. There were pages that told me to run,
chgrp git /var/opt/gitlab/git-data/repositories
chmod 02770 /var/opt/gitlab/git-data/repositories
sudo gitlab-ctl reconfigure

but i still always end up with

There was an error running gitlab-ctl reconfigure:

storage_directory[/var/opt/gitlab/git-data] (gitlab::gitlab-rails line 49) had an error: Mixlib::ShellOut::ShellCommandFailed: ruby_block[directory resource: /var/opt/gitlab/git-data] (gitlab::gitlab-rails line 36) had an error: Mixlib::ShellOut::ShellCommandFailed: Failed asserting that ownership of "/var/opt/gitlab/git-data" was git:git
---- Begin output of set -x && [ "$(stat --printf='%U:%G' $(readlink -f /var/opt/gitlab/git-data))" = 'git:git' ] ----
STDERR: + readlink -f /var/opt/gitlab/git-data
+ stat --printf=%U:%G /var/opt/gitlab/git-data
+ [ root:root = git:git ]
---- End output of set -x && [ "$(stat --printf='%U:%G' $(readlink -f /var/opt/gitlab/git-data))" = 'git:git' ] ----
Ran set -x && [ "$(stat --printf='%U:%G' $(readlink -f /var/opt/gitlab/git-data))" = 'git:git' ] returned 1

Im pretty new to this and dont quite fully understand git so this was where i could no longer progress.