如何创建多个 GIT 实例? [英] How to create multiple instances of GIT?

查看:29
本文介绍了如何创建多个 GIT 实例?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在努力创建一个使用 GIT 的项目管理系统.现在它处于早期阶段.这个想法是

I am working to create a project management system that uses GIT. Right now it is on early stage. The idea is

  1. 我们有设计"、网络"、Android"等部门
  2. 我们每个部门下都有很多项目.
  3. 我们为每个项目都有 GIT 存储库.

为此,我想做的是创建与部门一样多的 GIT 实例.因此,每个实例都有自己的 SSH 端口号,以任何顺序排列,例如设计 GIT 实例"为 1234,Web GIT 实例"为 1235,依此类推.因此,任何部门员工都只能访问其相关部门项目.
问题:
我们可以创建 GIT 实例吗?如果是,那么如何?我对 GIT 和 ubuntu 非常陌生

For this purpose what i want to do is that create instances of GIT as many as departments. So every instance has its own SSH port number in any order e.g 1234 for "Design GIT Instance" and 1235 for "Web GIT Instance" and so on. So any department employees only access their relative department projects.
Question:
Can we make instances of GIT? if yes then how?I am very much new to GIT and ubuntu

推荐答案

是的,单个服务器可以为多个 Git 存储库提供服务.不要将其视为多个实例.它只是一个通过 ssh 访问的文件.

Yes, a single server can serve multiple Git repositories. Don't think of it as multiple instances. It's just a file that's accessed over ssh.

通常,您不会通过端口号来执行此操作.(同样,它不是一个实例.它只是一个文件.)Git 旨在通过 ssh 访问.将每个存储库放在不同的位置(如 .../design.git).使用 Linux 用户凭据控制对存储库的访问.设置 git 服务器有点复杂,需要一些 Linux 知识.文档将提供有关如何执行此操作的更多信息.

Normally, you wouldn't do it by port number. (Again, it's not an instance. It's just a file.) Git is designed to be accessed by ssh. Put each repository at a different location (like .../design.git). Control access to the repository with Linux user credentials. Setting up a git server is a bit complicated and will require some Linux knowledge. The documentation will provide more information about how to do this.

使用 BitBucket 或 GitHub 或类似服务来为您设置和管理对存储库的访问权限可能会容易得多.

It would probably be much easier to use BitBucket or GitHub or a similar service to set up and manage access to the repositories for you.

这篇关于如何创建多个 GIT 实例?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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