Warning: file_get_contents(/data/phpspider/zhask/data//catemap/6/cplusplus/143.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
如何在gitolite中检查其他用户的权限?_Git_Gitolite - Fatal编程技术网

如何在gitolite中检查其他用户的权限?

如何在gitolite中检查其他用户的权限?,git,gitolite,Git,Gitolite,我找到了一个指向文档的链接,上面说ssh info命令可以用来查看其他用户的权限,但我一直无法让它正常工作 我做错了什么 $ ssh git@ahp0625 info git <user> Usage: gitolite info [-lc] [-ld] [-json] [<repo name pattern>] List all existing repos you can access, as well as repo name patterns you ca

我找到了一个指向文档的链接,上面说ssh info命令可以用来查看其他用户的权限,但我一直无法让它正常工作

我做错了什么

$ ssh git@ahp0625 info git <user>

Usage:  gitolite info [-lc] [-ld] [-json] [<repo name pattern>]

List all existing repos you can access, as well as repo name patterns you can
create repos from (if any).

    '-lc'       lists creators as an additional field at the end.
    '-ld'       lists description as an additional field at the end.
    '-json'     produce JSON output instead of normal output
$sshgit@ahp0625信息吉特
用法:gitolite info[-lc][-ld][-json][]
列出您可以访问的所有现有回购协议,以及您可以访问的回购协议名称模式
从(如果有)创建回购协议。
“-lc”将创建者列为末尾的附加字段。
“-ld”在末尾将说明作为附加字段列出。
“-json”生成json输出,而不是正常输出
可选模式是限制回购的未编排正则表达式 在这两种情况下都进行了搜查。如果你有更多的时间,它可能会使事情加快一点 而不是几千次回购。

试试:

sshgit@ahp0625信息git

因为回购协议的模式似乎是强制性的,所以你可以用期限来作弊,正如你发布的链接中所说:

“info”命令向您显示 您已被授予任何访问权限的配置文件。如果你 提供可选模式。输出将限于回购 符合这种模式。如果您是管理员,您可以附加 用户可以查看他们的权限,而不是您自己的权限;在此模式下 模式是必需的,即使您只是使用。欺骗


从您收到的帮助消息中,您正在使用v3,这也是最近的一个

v3 info
不允许使用该语法。
有关以其他用户身份运行任何命令的更通用方法,请参阅。

(您需要将“
sudo
”添加到--”中已启用命令的列表中,并在其后添加逗号。)

为什么?gitolite V2。它已经过时,g3只有当前用户的info命令。本例中的名称模式为“git”。在它之后添加句点是不正确的。句点可以用作通配符并替换名称模式git。但是在name_模式之后添加任何内容都会引发错误。