在服务器上使用Git进行访问控制(不是gitosis或gitolite) [英] Access control with Git on the server (not gitosis or gitolite)

查看:131
本文介绍了在服务器上使用Git进行访问控制(不是gitosis或gitolite)的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我试图为每个回购设置访问控制(只有三个权限不可访问,只读,读/写)。我有一个外部应用程序控制它,这使得同步管理git回购(如gitosis和gitolite提供的)不实际。

I am trying to set up access control per repo only (with the three permissions no-access, read-only, read/write). I am having an external application control it, which makes syncing admin git repos (such as what gitosis and gitolite provide) not practical.

完美的工作是设置将允许我简单地调用系统命令来授予用户(ssh密钥)访问权限,创建回购协议和删除回购协议。例如:

What would work perfectly is a setup that would allow me to simply call system commands to grant users (ssh keys) access, create repos, and delete repos. for example:

git -acl grant R user1.pub /path/to/repo.git - Grants user1对repo的只读访问
git -acl grant RE user2.pub /path/to/repo.git - 在repo上授予user2读/写访问权限
git-acl create /path/to/repo2.git - 创建回购

git-acl grant R user1.pub /path/to/repo.git - Grants user1 read-only access on the repo git-acl grant RE user2.pub /path/to/repo.git - Grants user2 read/write access on the repo git-acl create /path/to/repo2.git - Creates repo

等等。 。

有人知道这样的工具吗?

Does anyone know of a tool like this?

推荐答案

看起来基本的SSH和文件系统访问控制是完成你所要求的传统方式。

It seems like basic ssh and file-system access control is the traditional way to accomplish what you are asking.

请参阅 https://wincent.com/wiki/Git_repository_access_control

这篇关于在服务器上使用Git进行访问控制(不是gitosis或gitolite)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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