1
votes

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.

2

2 Answers

1
votes

Thankfully I managed to resolve this.

Luckily Gitlab required an update so I ran 'yum update' and let all the necessary packages update. Once complete, I ran 'gitlab-ctl reconfigure' and finally 'gitlab-ctl restart' and everything now seems to be working again.

0
votes

This would have probably fixed the problem: gitlab-rake cache:clear RAILS_ENV=production