I ran out of space on the partition the git-data folder was stored on, so I followed the steps in this link change the data directory gitlab to store repos elsewhere
However this didn't work, so I've moved the git-data folder back to /var/opt/gitlab/git-data and restored the gitlab.rb file configuration back to how it was before, and after reconfiguring gitlab and restarting it's still not working.
When I try to access a repository via the web interface, Gitlab simple tells me that the repository is empty.
I've also tried changing the permissions on the git-data folder to have git as the owner and group, and changing the permissions to 755.
Is someone able to advice a possible fix for this?
I've freed up space on the partition now so that is no longer an issue.
EDIT: After some reading I've set the following permissions, which hasn't resolved the issue;
# Holds repositories directory
sudo chown -R -v git:root /var/opt/gitlab/git-data
sudo chmod -R -v 0700 /var/opt/gitlab/git-data
# Holds git repositories
sudo chown -R -v git:git /var/opt/gitlab/git-data/repositories
sudo chmod -R -v 2770 /var/opt/gitlab/git-data/repositories
EDIT: I've logged into Gitlab and created a new repository, which has created fine and appears in the git-data/repositories folder, so I suspect that the permissions on the git-data folder are correct. However for some reason gitlab still thinks that the existing repositories are empty.