gitosis 与 gitolite? [英] gitosis vs gitolite?

查看:32
本文介绍了gitosis 与 gitolite?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在寻找安装 git 服务器以与我的团队共享项目.我不想在服务器上为每个需要 git 访问权限的开发人员创建一个具有 SSH 访问权限的用户帐户.似乎有两个并发解决方案涵盖了这个问题:gitosis &硅藻土.

I am looking for installing a git server to share projects with my team. I don't want to create a user account on the server with SSH access for each developer that needs a git access. It seems there is two concurrent solutions that cover this issue : gitosis & gitolite.

我找不到两种解决方案之间的任何比较.它们之间的主要区别是什么?还有其他类似的解决方案吗?

I could not find any comparison between both solutions. What are the main differences between them? Are there other similar solution?

推荐答案

我正在寻找安装 git 服务器以与我的团队共享项目.

I am looking for installing a git server to share projects with my team.

你可以只是使用 git.

要拥有一个 git 服务器,您在远程服务器上唯一需要的就是 git.如果您不需要细粒度权限(仅与您的团队共享表明这是一种可能性)或任何额外功能,则不需要 gitolite 或类似工具.

You can just use git.

To have a git server the only thing you need on the remote server is git. If you don't require fine-grained permissions (sharing with only your team suggests that's a possibility) or any extra features, you don't need gitolite, or similar.

如果远程服务器上的 git 可用,您可以立即执行您要求的操作,而无需执行任何操作

If git is available on the remote server, you can do what you're asking right now, without doing anything

ssh [user@]server
cd repos/are/here/
mkdir project.git
cd project.git
git init --bare

本地:

cd projects/are/here/project
git remote add origin [user@]server:repos/are/here/project.git
git push -u origin master

设置 git 服务器很容易.

如果你想和一个专门的 git 用户一起做事,设置 git 服务器 很短 - 因为它真的很容易做到.

Setting up a git server is easy.

If you want to do things with a dedicated git user, the docs for setting up a git server are short - because it really is quite easy to do.

总结:

  • 安装git
  • 创建一个名为 git 的用户
  • 将您和您团队的公钥添加到 git 用户的 .ssh/authorized_keys 文件
  • 修改git用户的shell为git-shell
  • 在服务器上创建存储库
  • 开始 git pull/push 到 git@yourserver.com

使用专用 git 用户与不使用专用 git 用户之间的唯一区别在于,如果您将 git 用户设置为使用 git-shell,它将不允许自己这样做还要别的吗.就充当 git 服务器而言,它与免安装解决方案相同

The only difference between using a dedicated git user and not, is that if you setup the git user to use git-shell it won't allow itself to do anything else. In terms of acting as a git server though, it's identical to the no-install solution

这篇关于gitosis 与 gitolite?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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