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

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

问题描述

我正在尝试仅为每个 repo 设置访问控制(具有不可访问、只读、读/写三个权限).我有一个外部应用程序控制它,这使得同步管理 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 - 授予 user1 对 repo 的只读访问权限git-acl grant RE user2.pub/path/to/repo.git - 授予 user2 对 repo 的读/写访问权限git-acl create/path/to/repo2.git - 创建 repo

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天全站免登陆