My team has a couple git repositories on a NAS server at /net/CM/repo.git
and /net/CM/repo2.git
. I have recently joined the team and told them about GitLab, they thought it would be a great tool to implement.
However, they want me to install GitLab on a different server, we'll call it the Super Server, and the other we'll call the NAS Server.
I've installed GitLab on the Super Server and it runs great, but I'm having difficulty getting it to detect my git repos on the NAS Server. Is that possible? I don't want the rest of the team to have to change their remote origin's on their git repos if possible. I'd like them to continue to push to the standard repo and GitLab should detect the change.
I tried to set the git_data_dir
as mentioned in this Stack Overflow post:
git_data_dir "/net/CM/"
But when I run sudo gitlab-ctl reconfigure
, I end up with permission errors. It says it can't create directories at /net/CM/
.
I also tried making a /net/git-data/
directory, and I set the permissions to 777 just to see if it would work, but to no avail.
So to sum it up, How can I have GitLab's web software run on my Super Server, but have all of my repos on my NAS Server?
Update
Someone asked me how I mounted the NAS server. I followed instructions provided to me when I joined the team, but here they are:
# I pulled out the ip's and ports for security purposes.
sudo apt-get install nfs-common
sudo mkdir /net
sudo mount -t nfs -o proto=tcp,port=[port] [ip]:/net /net
sudo vim /etc/fstab
# Add the following lines to fstab:
[ip]:/net /net nfs auto 0 0
[ip]:/project_name /projectname nfs auto 0 0