Git在一家公司 - 托管自己的服务器 [英] Git in a company - hosting own server

查看:170
本文介绍了Git在一家公司 - 托管自己的服务器的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我将Git呈现给目前使用Visual Source Safe的10人编程团队。

他们需要在公司内托管他们的Git服务器。 Windows或Linux。目录认证是Novell eDirectory。



他们需要一些细粒度的安全性来确定谁可以推送到中央服务器。



From:

https://stackoverflow.com/questions/923130/what-type-of-git-server-do-you-use-or-how-do-you-use -git



也许工作流可能是:


  • 安装程序服务器上有10个用户。

  • 在10个用户有权写入的服务器文件系统上设置公​​用目录
  • 通过SSH将文件推送到服务器,例如git push dave @ test.com:user1/project.git

  • 但我需要在服务器上安装密钥



问题:是否有人在公司中成功使用此类工作流程。什么工作?这开始感觉像大多数人使用Git和GitHub等。

<编辑]:请参阅选择源代码管理系统:VSS之后的逻辑后续步骤也许Git并不适合这个团队。 / p>

解决方案

确实有可能拥有一个拥有访问控制的自托管git存储库。通常,在服务器机器上创建一个名为 git 的帐户,将该帐户的shell设置为 git-shell ,它是一个仅供git使用的有限shell,然后将每个授权用户的公钥放在 git -user的.ssh / authorized_keys文件中。



http://blog.commonthread.com/2008/4/14/setting-up-a-git-server 包含了大部分其他实际细节。


I am presenting Git to a 10 man programming team who currently use Visual Source Safe.

They need to host their Git server inside the company. Windows or Linux. Directory authentication is Novell eDirectory.

They need some granular security on who can push to the central server.

From:

https://stackoverflow.com/questions/923130/what-type-of-git-server-do-you-use-or-how-do-you-use-git

Maybe a workflow could be:

  • Setup 10 users on the server.
  • Setup a common directory on the servers filesystem that the 10 users have write access to
  • Push files to the server via SSH eg git push dave@test.com:user1/project.git
  • But then I need that the keys are installed on the server

Question: Does anyone use a workflow like this successfully in a company. What works? This is starting to feel like most people use Git with GitHub etc..

[Edit]: Please see Choosing a source control system: logical next steps after VSS Maybe Git isn't the right fit for this team.

解决方案

It's certainly possible to have a self-hosted git repository with access control. Typically what one would do is create a account named git on the server machine, set the shell of that account to git-shell, which is a limited shell designed for use by git only, and then put the public keys for each authorized user in the git-user's .ssh/authorized_keys file.

http://blog.commonthread.com/2008/4/14/setting-up-a-git-server has most of the rest of the actual details.

这篇关于Git在一家公司 - 托管自己的服务器的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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