Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

My gitlab installation is running out of space. I want to move the user's repositories to another drive. I can not find any walkthroughs or good forum posts about doing this.

I have tries moving /opt/gitlab/apps/gitlab/repositories to another drive, and then creating a symlink from the original folder name to the new one. This worked as far as it allowed me to read the data in the repositories, but it failed at the point of trying to create a new repo, when trying to push to the master branch (git push -u origin master), stating that I had no permission to commit to master. When I put the folder back in place instead of the symlink, all went back to working as expected.

Is there a better/correct way to move the repositories into a different location, and different drive on the system?

share|improve this question

It seems that the new parent directory on the new device has wrong permissions. Check owner, group, and permissions of the parent directory of all repositories on the old and the new location.

Also, in case it really is caused by the symlink (which I doubt), you could use mount --bind instead of a symlink to rebind the directory to the new disk.

share|improve this answer
could you elaborate on what the permissions should be on the new drive? – Billy Moon Nov 30 '13 at 2:47

assuming you set up pki / non-interactive authentication with github (ie. uploaded authenticated corresponding public key so that when you run git pull, your ~.ssh/id_dsa or ~..ssh/is_rsa private key is read for authentication).

the problem is most likely the corrensponsding private key is missning on the new device in:


make sure your private key is pasted over to that location, uid is correct, and chmod 0400 it or is wont work.


so once your public key is upped to github, anyone with the corresponding private key can download / change / delete your source code. if it has been compropised, you can revoke it and add another one as long as you have login atccess to github portal or access to email on file with github or change psassword / get into portal

private key should be kept offline and encrypted

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.