我如何在一台服务器上使用GitLab并将所有存储库存储在另一台服务器上? [英] How can I use GitLab on one server and store all of the repositories on another?

查看:521
本文介绍了我如何在一台服务器上使用GitLab并将所有存储库存储在另一台服务器上?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我的团队在 /net/CM/repo.git / net / CM / repo2上的NAS服务器上有几个git存储库。 GIT中。我最近加入了团队,告诉他们关于GitLab,他们认为这将是一个很好的工具。



然而,他们希望我在不同的服务器上安装GitLab ,我们称它为超级服务器,另一个我们称之为NAS服务器。



我已经在超级服务器上安装了GitLab,它运行良好,但是我很难在NAS服务器上检测到我的git仓库。那可能吗?如果可能的话,我不希望团队的其他成员必须在其git仓库中更改其远程原点。我希望他们继续推动标准回购,并且GitLab应该检测到这种变化。



我试图设置 git_data_dir ,如在这个堆栈溢出帖子中所述:

  git_data_dir/ net / CM /

但是当我运行 sudo gitlab-ctl reconfigure ,我最终遇到权限错误。它说它不能在 / net / CM / 中创建目录。我也尝试制作一个 / net / git-data / 目录,我将权限设置为777,以查看它是否可行,但无济于事。



因此,总结一下,如何让GitLab的网络软件在我的超级服务器上运行,但是我的NAS服务器上还有所有回购站点?

更新



有人问我如何安装NAS服务器。我加入团队时遵循了提供给我的指示,但他们是:

 #我拿出了ip和端口安全目的。 
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
#将以下行添加到fstab:
[ip]:/ net / net nfs auto 0 0
[ip]:/ project_name / projectname nfs auto 0 0


解决方案

超级服务器IP地址给启用了root权限的主机,并且都很好。我没有经过测试,看看我是否可以在重新配置后取消选中该框,然后查看是否仍然有效。


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

解决方案

I went into our NAS configuration and added my Super Server ip address to the "Root privilege-enabled hosts" and all is good. I haven't tested to see if I can uncheck that box after I've reconfigured and see if things still work.

这篇关于我如何在一台服务器上使用GitLab并将所有存储库存储在另一台服务器上?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆